debug
Browse files
app.py
CHANGED
|
@@ -26,6 +26,8 @@ METHOD_MAP = {
|
|
| 26 |
|
| 27 |
|
| 28 |
def generate_viz(image, method, class_index=None):
|
|
|
|
|
|
|
| 29 |
print(f"Image: {image.size}")
|
| 30 |
print(f"Method: {method}")
|
| 31 |
print(f"Class: {class_index}")
|
|
@@ -58,7 +60,7 @@ iface = gr.Interface(
|
|
| 58 |
["Transformer-Explainability/samples/catdog.png", "tiba", None],
|
| 59 |
["Transformer-Explainability/samples/catdog.png", "rollout", 243],
|
| 60 |
["Transformer-Explainability/samples/el2.png", "tiba", None],
|
| 61 |
-
|
| 62 |
["Transformer-Explainability/samples/dogbird.png", "lrp", 161],
|
| 63 |
],
|
| 64 |
)
|
|
|
|
| 26 |
|
| 27 |
|
| 28 |
def generate_viz(image, method, class_index=None):
|
| 29 |
+
if class_index is not None:
|
| 30 |
+
class_index = int(class_index)
|
| 31 |
print(f"Image: {image.size}")
|
| 32 |
print(f"Method: {method}")
|
| 33 |
print(f"Class: {class_index}")
|
|
|
|
| 60 |
["Transformer-Explainability/samples/catdog.png", "tiba", None],
|
| 61 |
["Transformer-Explainability/samples/catdog.png", "rollout", 243],
|
| 62 |
["Transformer-Explainability/samples/el2.png", "tiba", None],
|
| 63 |
+
["Transformer-Explainability/samples/el2.png", "gradcam", 340],
|
| 64 |
["Transformer-Explainability/samples/dogbird.png", "lrp", 161],
|
| 65 |
],
|
| 66 |
)
|