Spaces:
Runtime error
Runtime error
use savefig.
Browse files
app.py
CHANGED
@@ -79,7 +79,7 @@ def serialize_images(processed_map):
|
|
79 |
for i in range(processed_map.shape[0]):
|
80 |
plt.imshow(processed_map[i].numpy())
|
81 |
plt.title(f"Attention head: {i}", fontsize=14)
|
82 |
-
plt.
|
83 |
|
84 |
|
85 |
def generate_class_attn_map(image, block_id=0):
|
|
|
79 |
for i in range(processed_map.shape[0]):
|
80 |
plt.imshow(processed_map[i].numpy())
|
81 |
plt.title(f"Attention head: {i}", fontsize=14)
|
82 |
+
plt.savefig(fname="attention_map_{i}.png")
|
83 |
|
84 |
|
85 |
def generate_class_attn_map(image, block_id=0):
|