Spaces:
Sleeping
Sleeping
Update api.py
Browse files
api.py
CHANGED
|
@@ -275,7 +275,7 @@ async def classify(image: UploadFile = File(...)):
|
|
| 275 |
predicted_class_idx = int(predicted_class_idx)
|
| 276 |
|
| 277 |
heatmap = make_gradcam_heatmap(img_array, model, last_conv_layer_name)
|
| 278 |
-
base64_image = display_gradcam(
|
| 279 |
|
| 280 |
# Return the base64 encoded image in the response
|
| 281 |
|
|
|
|
| 275 |
predicted_class_idx = int(predicted_class_idx)
|
| 276 |
|
| 277 |
heatmap = make_gradcam_heatmap(img_array, model, last_conv_layer_name)
|
| 278 |
+
base64_image = display_gradcam( np.array(img), heatmap)
|
| 279 |
|
| 280 |
# Return the base64 encoded image in the response
|
| 281 |
|