Spaces:
Running
on
Zero
Running
on
Zero
Update
Browse files
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
|