Update app.py
Browse files
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=
|
173 |
|
174 |
|
175 |
gr.Markdown("")
|
|
|
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("")
|