Update app.py
Browse files
app.py
CHANGED
@@ -23,7 +23,7 @@ def predict_image(img, conf_threshold, iou_threshold):
|
|
23 |
|
24 |
return im
|
25 |
|
26 |
-
|
27 |
iface = gr.Interface(
|
28 |
fn=predict_image,
|
29 |
inputs=[
|
@@ -32,8 +32,9 @@ iface = gr.Interface(
|
|
32 |
gr.Slider(minimum=0, maximum=1, value=0.45, label="IoU threshold"),
|
33 |
],
|
34 |
outputs=gr.Image(type="pil", label="Result"),
|
35 |
-
|
36 |
-
|
|
|
37 |
)
|
38 |
|
39 |
iface.launch()
|
|
|
23 |
|
24 |
return im
|
25 |
|
26 |
+
example_list = [["examples/" + example] for example in os.listdir("examples")]
|
27 |
iface = gr.Interface(
|
28 |
fn=predict_image,
|
29 |
inputs=[
|
|
|
32 |
gr.Slider(minimum=0, maximum=1, value=0.45, label="IoU threshold"),
|
33 |
],
|
34 |
outputs=gr.Image(type="pil", label="Result"),
|
35 |
+
examples=example_list,
|
36 |
+
title="Object Detection",
|
37 |
+
description="Upload Valid Images:Traffic Sign/Light & Fire Hydrant",
|
38 |
)
|
39 |
|
40 |
iface.launch()
|