Spaces:
Runtime error
Runtime error
Commit ·
5fa7512
1
Parent(s): 345df9c
Update app.py
Browse files
app.py
CHANGED
|
@@ -34,11 +34,11 @@ classes = ('plane', 'car', 'bird', 'cat', 'deer',
|
|
| 34 |
def inference(input_img, see_misclassified=False,num_misclassified_imgs=0,see_gradcam=False,num_gradcam_imgs=0,transparency = 0.85, target_layer_number = -1,top_classes=3):
|
| 35 |
|
| 36 |
if see_misclassified: # show misclassified images
|
| 37 |
-
org_img = np.asarray(Image.open('
|
| 38 |
input_img = org_img
|
| 39 |
|
| 40 |
elif num_gradcam_imgs > 0: # show gradcam on example images
|
| 41 |
-
org_img = np.asarray(Image.open('
|
| 42 |
input_img = org_img
|
| 43 |
|
| 44 |
else: # nothing chosen - misclassified or gradcam
|
|
|
|
| 34 |
def inference(input_img, see_misclassified=False,num_misclassified_imgs=0,see_gradcam=False,num_gradcam_imgs=0,transparency = 0.85, target_layer_number = -1,top_classes=3):
|
| 35 |
|
| 36 |
if see_misclassified: # show misclassified images
|
| 37 |
+
org_img = np.asarray(Image.open('misclassified_images/mis_eg_0.jpg'))
|
| 38 |
input_img = org_img
|
| 39 |
|
| 40 |
elif num_gradcam_imgs > 0: # show gradcam on example images
|
| 41 |
+
org_img = np.asarray(Image.open('examples/car.jpg'))
|
| 42 |
input_img = org_img
|
| 43 |
|
| 44 |
else: # nothing chosen - misclassified or gradcam
|