kcz358 commited on
Commit
bfeec53
·
1 Parent(s): a8af4c9
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -94,8 +94,9 @@ def generate_activations(image):
94
  torch.cuda.empty_cache()
95
  return topk_indices
96
 
97
-
98
  def visualize_activations(image, feature_num):
 
99
  base_img_tokens = 576
100
  patch_size = 24
101
  # Using Cached tensor
 
94
  torch.cuda.empty_cache()
95
  return topk_indices
96
 
97
+ @spaces.GPU
98
  def visualize_activations(image, feature_num):
99
+ global cached_tensor
100
  base_img_tokens = 576
101
  patch_size = 24
102
  # Using Cached tensor