Spaces:
Sleeping
Sleeping
Update model/heatmap.py
Browse files- model/heatmap.py +3 -6
model/heatmap.py
CHANGED
|
@@ -1,9 +1,6 @@
|
|
| 1 |
import numpy as np
|
| 2 |
-
|
| 3 |
-
from pytorch_grad_cam.utils.image import show_cam_on_image
|
| 4 |
|
| 5 |
def cam_heatmap(model, tensor, image):
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
img = np.array(image).astype(float)/255
|
| 9 |
-
return show_cam_on_image(img, grayscale, use_rgb=True)
|
|
|
|
| 1 |
import numpy as np
|
| 2 |
+
|
|
|
|
| 3 |
|
| 4 |
def cam_heatmap(model, tensor, image):
|
| 5 |
+
# Grad-CAM disabled for Hugging Face
|
| 6 |
+
return np.array(image)
|
|
|
|
|
|