Spaces:
Runtime error
Runtime error
NORLIE JHON MALAGDAO
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -379,7 +379,7 @@ fig, axes = plt.subplots(nrows=3, ncols=5, figsize=(15, 10),
|
|
379 |
|
380 |
for i, ax in enumerate(axes.flat):
|
381 |
img_path = test_df.Filepath.iloc[random_index[i]]
|
382 |
-
img_array = tf.keras.applications.efficientnet_v2.preprocess_input(
|
383 |
heatmap = make_gradcam_heatmap(img_array, model, last_conv_layer_name="top_conv")
|
384 |
cam_path = save_and_display_gradcam(img_path, heatmap)
|
385 |
ax.imshow(plt.imread(cam_path))
|
|
|
379 |
|
380 |
for i, ax in enumerate(axes.flat):
|
381 |
img_path = test_df.Filepath.iloc[random_index[i]]
|
382 |
+
img_array = tf.keras.applications.efficientnet_v2.preprocess_input(get_img_array(img_path, size=(224, 224)))
|
383 |
heatmap = make_gradcam_heatmap(img_array, model, last_conv_layer_name="top_conv")
|
384 |
cam_path = save_and_display_gradcam(img_path, heatmap)
|
385 |
ax.imshow(plt.imread(cam_path))
|