Spaces:
Sleeping
Sleeping
Commit ·
37e6364
1
Parent(s): 7af878d
Update app.py
Browse files
app.py
CHANGED
|
@@ -90,6 +90,12 @@ def process_image_and_plot(image, model, scaled_anchors):
|
|
| 90 |
return fig,cam_image
|
| 91 |
|
| 92 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 93 |
def processed_image(image):
|
| 94 |
figure,gradcam = process_image_and_plot(image, model, scaled_anchors)
|
| 95 |
return figure,gradcam
|
|
@@ -103,5 +109,6 @@ demo = gr.Interface(processed_image,
|
|
| 103 |
outputs=[gr.Plot(),gr.Image(shape=(32, 32), label="Model Prediction")],
|
| 104 |
title=title,
|
| 105 |
description=description,
|
|
|
|
| 106 |
)
|
| 107 |
demo.launch()
|
|
|
|
| 90 |
return fig,cam_image
|
| 91 |
|
| 92 |
|
| 93 |
+
examples = [
|
| 94 |
+
["images/cycle.jpg"],
|
| 95 |
+
["images/human.jpg"],
|
| 96 |
+
["images/automobile.jpg"],
|
| 97 |
+
]
|
| 98 |
+
|
| 99 |
def processed_image(image):
|
| 100 |
figure,gradcam = process_image_and_plot(image, model, scaled_anchors)
|
| 101 |
return figure,gradcam
|
|
|
|
| 109 |
outputs=[gr.Plot(),gr.Image(shape=(32, 32), label="Model Prediction")],
|
| 110 |
title=title,
|
| 111 |
description=description,
|
| 112 |
+
examples=examples,
|
| 113 |
)
|
| 114 |
demo.launch()
|