Update app.py
Browse files
app.py
CHANGED
@@ -81,10 +81,12 @@ def set_example_url(example: list) -> dict:
|
|
81 |
return gr.Textbox.update(value=example[0])
|
82 |
|
83 |
|
84 |
-
title = """<h1 id="title">Face Mask Detection
|
85 |
|
86 |
description = """
|
87 |
-
|
|
|
|
|
88 |
- [nickmuchi/yolos-small-finetuned-masks](https://huggingface.co/nickmuchi/yolos-small-finetuned-masks)
|
89 |
"""
|
90 |
|
@@ -107,7 +109,7 @@ with demo:
|
|
107 |
gr.Markdown(description)
|
108 |
gr.Markdown(twitter_link)
|
109 |
options = gr.Dropdown(choices=models,label='Select Object Detection Model',show_label=True)
|
110 |
-
slider_input = gr.Slider(minimum=0.2,maximum=1,value=0.
|
111 |
|
112 |
with gr.Tabs():
|
113 |
with gr.TabItem('Image URL'):
|
@@ -123,7 +125,7 @@ with demo:
|
|
123 |
with gr.TabItem('Image Upload'):
|
124 |
with gr.Row():
|
125 |
img_input = gr.Image(type='pil')
|
126 |
-
img_output_from_upload= gr.Image(shape=(
|
127 |
|
128 |
with gr.Row():
|
129 |
example_images = gr.Dataset(components=[img_input],
|
|
|
81 |
return gr.Textbox.update(value=example[0])
|
82 |
|
83 |
|
84 |
+
title = """<h1 id="title">Face Mask Detection with YOLOS</h1>"""
|
85 |
|
86 |
description = """
|
87 |
+
The model used in this space is the fine-tuned version of the COCO trained [hustlv/yolos-small](https://huggingface.co/hustlv/yolos-small). This fine-tuned model was trained for 200 epochs on the [face-mask-dataset]() from Kaggle which consisted of 853 images.
|
88 |
+
|
89 |
+
Links to HuggingFace Model:
|
90 |
- [nickmuchi/yolos-small-finetuned-masks](https://huggingface.co/nickmuchi/yolos-small-finetuned-masks)
|
91 |
"""
|
92 |
|
|
|
109 |
gr.Markdown(description)
|
110 |
gr.Markdown(twitter_link)
|
111 |
options = gr.Dropdown(choices=models,label='Select Object Detection Model',show_label=True)
|
112 |
+
slider_input = gr.Slider(minimum=0.2,maximum=1,value=0.5,step=0.1,label='Prediction Threshold')
|
113 |
|
114 |
with gr.Tabs():
|
115 |
with gr.TabItem('Image URL'):
|
|
|
125 |
with gr.TabItem('Image Upload'):
|
126 |
with gr.Row():
|
127 |
img_input = gr.Image(type='pil')
|
128 |
+
img_output_from_upload= gr.Image(shape=(750,750))
|
129 |
|
130 |
with gr.Row():
|
131 |
example_images = gr.Dataset(components=[img_input],
|