nickmuchi commited on
Commit
311d049
·
1 Parent(s): 12b1745

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -93,7 +93,7 @@ def set_example_image(example: list) -> dict:
93
  return gr.Image.update(value=example[0])
94
 
95
  def set_example_url(example: list) -> dict:
96
- return gr.Textbox.update(value=example[0]), get_original_image(example[0])
97
 
98
 
99
  title = """<h1 id="title">Face Mask Detection with YOLOS</h1>"""
@@ -169,7 +169,7 @@ with demo:
169
  img_but.click(detect_objects,inputs=[options,url_input,img_input,web_input,slider_input],outputs=[img_output_from_upload,original_image],queue=True)
170
  cam_but.click(detect_objects,inputs=[options,url_input,img_input,web_input,slider_input],outputs=[img_output_from_webcam,original_image],queue=True)
171
  example_images.click(fn=set_example_image,inputs=[example_images],outputs=[img_input])
172
- example_url.click(fn=[set_example_url],inputs=[example_url],outputs=[url_input,original_image])
173
 
174
 
175
  gr.Markdown("![visitor badge](https://visitor-badge.glitch.me/badge?page_id=nickmuchi-face-mask-detections-with-yolos)")
 
93
  return gr.Image.update(value=example[0])
94
 
95
  def set_example_url(example: list) -> dict:
96
+ return gr.Textbox.update(value=example[0]), gr.Image.update(value=get_original_image(example[0]))
97
 
98
 
99
  title = """<h1 id="title">Face Mask Detection with YOLOS</h1>"""
 
169
  img_but.click(detect_objects,inputs=[options,url_input,img_input,web_input,slider_input],outputs=[img_output_from_upload,original_image],queue=True)
170
  cam_but.click(detect_objects,inputs=[options,url_input,img_input,web_input,slider_input],outputs=[img_output_from_webcam,original_image],queue=True)
171
  example_images.click(fn=set_example_image,inputs=[example_images],outputs=[img_input])
172
+ example_url.click(fn=set_example_url,inputs=[example_url],outputs=[url_input,original_image])
173
 
174
 
175
  gr.Markdown("![visitor badge](https://visitor-badge.glitch.me/badge?page_id=nickmuchi-face-mask-detections-with-yolos)")