rachana219 commited on
Commit
6394599
·
1 Parent(s): 9dc1e33

Updated app.py to fix labels for dropdown and default values

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -197,7 +197,7 @@ with gr.Blocks() as demo:
197
  image_input = gr.Image(type='pil', label="Input Image", source="upload")
198
  image_output = gr.Image(type='pil', label="Output Image", source="upload")
199
  fps_image = gr.Number(0,label='FPS')
200
- image_drop = gr.Dropdown(choices=models,value=models[0])
201
  image_iou_threshold = gr.Slider(label="IOU Threshold",interactive=True, minimum=0.0, maximum=1.0, value=0.45)
202
  image_conf_threshold = gr.Slider(label="Confidence Threshold",interactive=True, minimum=0.0, maximum=1.0, value=0.25)
203
  gr.Examples(examples=examples_images,inputs=image_input,outputs=image_output)
@@ -208,8 +208,8 @@ with gr.Blocks() as demo:
208
  video_input = gr.Video(type='pil', label="Input Video", source="upload")
209
  video_output = gr.Video(type="pil", label="Output Video",format="mp4")
210
  fps_video = gr.Number(0,label='FPS')
211
- video_drop = gr.Dropdown(choices=models,value=models[0])
212
- tracking_drop = gr.Dropdown(choices=trackers,value=models[0])
213
  video_iou_threshold = gr.Slider(label="IOU Threshold",interactive=True, minimum=0.0, maximum=1.0, value=0.45)
214
  video_conf_threshold = gr.Slider(label="Confidence Threshold",interactive=True, minimum=0.0, maximum=1.0, value=0.25)
215
  gr.Examples(examples=examples_videos,inputs=video_input,outputs=video_output)
 
197
  image_input = gr.Image(type='pil', label="Input Image", source="upload")
198
  image_output = gr.Image(type='pil', label="Output Image", source="upload")
199
  fps_image = gr.Number(0,label='FPS')
200
+ image_drop = gr.Dropdown(choices=models,value=models[0],label="Select the model")
201
  image_iou_threshold = gr.Slider(label="IOU Threshold",interactive=True, minimum=0.0, maximum=1.0, value=0.45)
202
  image_conf_threshold = gr.Slider(label="Confidence Threshold",interactive=True, minimum=0.0, maximum=1.0, value=0.25)
203
  gr.Examples(examples=examples_images,inputs=image_input,outputs=image_output)
 
208
  video_input = gr.Video(type='pil', label="Input Video", source="upload")
209
  video_output = gr.Video(type="pil", label="Output Video",format="mp4")
210
  fps_video = gr.Number(0,label='FPS')
211
+ video_drop = gr.Dropdown(choices=models,value=models[0],label = "Select the model")
212
+ tracking_drop = gr.Dropdown(choices=trackers,value=trackers[0], label="Select the tracking method")
213
  video_iou_threshold = gr.Slider(label="IOU Threshold",interactive=True, minimum=0.0, maximum=1.0, value=0.45)
214
  video_conf_threshold = gr.Slider(label="Confidence Threshold",interactive=True, minimum=0.0, maximum=1.0, value=0.25)
215
  gr.Examples(examples=examples_videos,inputs=video_input,outputs=video_output)