Update app.py
Browse files
app.py
CHANGED
|
@@ -124,8 +124,8 @@ with demo:
|
|
| 124 |
gr.Markdown(title)
|
| 125 |
gr.Markdown(description)
|
| 126 |
gr.Markdown(twitter_link)
|
| 127 |
-
options = gr.Dropdown(choices=models,label='Object Detection Model',show_label=True
|
| 128 |
-
slider_input = gr.Slider(minimum=0.2,maximum=1,value=0.
|
| 129 |
|
| 130 |
with gr.Tabs():
|
| 131 |
with gr.TabItem('Image URL'):
|
|
@@ -143,7 +143,7 @@ with demo:
|
|
| 143 |
|
| 144 |
with gr.TabItem('Image Upload'):
|
| 145 |
with gr.Row():
|
| 146 |
-
img_input = gr.Image(type='pil')
|
| 147 |
img_output_from_upload= gr.Image(shape=(750,750))
|
| 148 |
|
| 149 |
with gr.Row():
|
|
@@ -157,7 +157,6 @@ with demo:
|
|
| 157 |
with gr.Row():
|
| 158 |
web_input = gr.Image(source='webcam',type='pil',shape=(750,750),streaming=True)
|
| 159 |
img_output_from_webcam= gr.Image(shape=(750,750))
|
| 160 |
-
#gr.Image(source="webcam",type='pil',shape=(750,750)).stream(detect_objects, inputs=[options,url_input,img_input,slider_input], outputs =[img_output_from_webcam])
|
| 161 |
|
| 162 |
cam_but = gr.Button('Detect')
|
| 163 |
|
|
|
|
| 124 |
gr.Markdown(title)
|
| 125 |
gr.Markdown(description)
|
| 126 |
gr.Markdown(twitter_link)
|
| 127 |
+
options = gr.Dropdown(choices=models,label='Object Detection Model',show_label=True)
|
| 128 |
+
slider_input = gr.Slider(minimum=0.2,maximum=1,value=0.5,step=0.1,label='Prediction Threshold')
|
| 129 |
|
| 130 |
with gr.Tabs():
|
| 131 |
with gr.TabItem('Image URL'):
|
|
|
|
| 143 |
|
| 144 |
with gr.TabItem('Image Upload'):
|
| 145 |
with gr.Row():
|
| 146 |
+
img_input = gr.Image(type='pil',shape=(750,750))
|
| 147 |
img_output_from_upload= gr.Image(shape=(750,750))
|
| 148 |
|
| 149 |
with gr.Row():
|
|
|
|
| 157 |
with gr.Row():
|
| 158 |
web_input = gr.Image(source='webcam',type='pil',shape=(750,750),streaming=True)
|
| 159 |
img_output_from_webcam= gr.Image(shape=(750,750))
|
|
|
|
| 160 |
|
| 161 |
cam_but = gr.Button('Detect')
|
| 162 |
|