fix additional arg that is present only in my local copy of the grad-cam lib
Browse files
app.py
CHANGED
@@ -101,8 +101,7 @@ def classify_image(input):
|
|
101 |
img_tensor=tensor,
|
102 |
reshape_transform=gradCam.reshape_transform_vit_huggingface,
|
103 |
n_components=5,
|
104 |
-
top_k=10
|
105 |
-
threshold=0,
|
106 |
)
|
107 |
gradCamImage = gradCam.run_grad_cam_on_image(model=model,
|
108 |
target_layer=targetLayerGradCam,
|
@@ -111,8 +110,7 @@ def classify_image(input):
|
|
111 |
img_tensor=tensor,
|
112 |
reshape_transform=gradCam.reshape_transform_vit_huggingface,
|
113 |
n_components=5,
|
114 |
-
top_k=10
|
115 |
-
threshold=0,
|
116 |
)
|
117 |
result = pipe(face)
|
118 |
return result[0]["label"], result[0]["score"], face, dffImage, gradCamImage
|
|
|
101 |
img_tensor=tensor,
|
102 |
reshape_transform=gradCam.reshape_transform_vit_huggingface,
|
103 |
n_components=5,
|
104 |
+
top_k=10
|
|
|
105 |
)
|
106 |
gradCamImage = gradCam.run_grad_cam_on_image(model=model,
|
107 |
target_layer=targetLayerGradCam,
|
|
|
110 |
img_tensor=tensor,
|
111 |
reshape_transform=gradCam.reshape_transform_vit_huggingface,
|
112 |
n_components=5,
|
113 |
+
top_k=10
|
|
|
114 |
)
|
115 |
result = pipe(face)
|
116 |
return result[0]["label"], result[0]["score"], face, dffImage, gradCamImage
|