Spaces:
Sleeping
Sleeping
Update api.py
Browse files
api.py
CHANGED
|
@@ -195,7 +195,7 @@ def predict_crop_disease(input_data):
|
|
| 195 |
|
| 196 |
return prediction[0] #predicted_label[0]
|
| 197 |
|
| 198 |
-
|
| 199 |
grad_model = tf.keras.models.Model(
|
| 200 |
[model.inputs], [model.get_layer(last_conv_layer_name).output, model.output]
|
| 201 |
)
|
|
|
|
| 195 |
|
| 196 |
return prediction[0] #predicted_label[0]
|
| 197 |
|
| 198 |
+
def make_gradcam_heatmap(img_array, model, last_conv_layer_name, pred_index=None):
|
| 199 |
grad_model = tf.keras.models.Model(
|
| 200 |
[model.inputs], [model.get_layer(last_conv_layer_name).output, model.output]
|
| 201 |
)
|