taquynhnga commited on
Commit
932fc3c
1 Parent(s): 33c3349

Update backend/adversarial_attack.py

Browse files
Files changed (1) hide show
  1. backend/adversarial_attack.py +2 -1
backend/adversarial_attack.py CHANGED
@@ -89,7 +89,8 @@ def find_smallest_epsilon(input_image, target):
89
  return perturbed_data, new_prob, new_id, new_label, epsilon
90
  return None
91
 
92
- @st.cache_data
 
93
  def generate_images(image_id, epsilon=0):
94
  model, feature_extractor = load_model("ConvNeXt")
95
  original_image_dict = load_image(image_id)
 
89
  return perturbed_data, new_prob, new_id, new_label, epsilon
90
  return None
91
 
92
+ # @st.cache_data
93
+ @st.cache(allow_output_mutation=True)
94
  def generate_images(image_id, epsilon=0):
95
  model, feature_extractor = load_model("ConvNeXt")
96
  original_image_dict = load_image(image_id)