Ramendra commited on
Commit
8cfd5fb
·
verified ·
1 Parent(s): 7d42c9f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
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
- title="Object tetection Gradio",
36
- description="Upload images for inference.",
 
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()