rachana219 commited on
Commit
15e5d7b
·
1 Parent(s): 5463006

Added tracking button

Browse files
Files changed (1) hide show
  1. app.py +6 -2
app.py CHANGED
@@ -206,7 +206,8 @@ with gr.Blocks() as demo:
206
  video_iou_threshold = gr.Slider(label="IOU Threshold",interactive=True, minimum=0.0, maximum=1.0, value=0.45)
207
  video_conf_threshold = gr.Slider(label="Confidence Threshold",interactive=True, minimum=0.0, maximum=1.0, value=0.25)
208
  gr.Examples(examples=examples_videos,inputs=video_input,outputs=video_output)
209
- video_button = gr.Button("Detect")
 
210
 
211
  # with gr.Tab("Webcam Video"):
212
  # gr.Markdown("## YOLOv7 Inference on Webcam Video")
@@ -215,7 +216,10 @@ with gr.Blocks() as demo:
215
  text_button.click(inference, inputs=[image_input,image_drop,
216
  image_iou_threshold,image_conf_threshold],
217
  outputs=[image_output,fps_image])
218
- video_button.click(inference2, inputs=[video_input,video_drop,
 
 
 
219
  video_iou_threshold,video_conf_threshold],
220
  outputs=[video_output,fps_video])
221
 
 
206
  video_iou_threshold = gr.Slider(label="IOU Threshold",interactive=True, minimum=0.0, maximum=1.0, value=0.45)
207
  video_conf_threshold = gr.Slider(label="Confidence Threshold",interactive=True, minimum=0.0, maximum=1.0, value=0.25)
208
  gr.Examples(examples=examples_videos,inputs=video_input,outputs=video_output)
209
+ video_button_detect = gr.Button("Detect")
210
+ video_button_track = gr.Button("Detect and track")
211
 
212
  # with gr.Tab("Webcam Video"):
213
  # gr.Markdown("## YOLOv7 Inference on Webcam Video")
 
216
  text_button.click(inference, inputs=[image_input,image_drop,
217
  image_iou_threshold,image_conf_threshold],
218
  outputs=[image_output,fps_image])
219
+ video_button_detect.click(inference2, inputs=[video_input,video_drop,
220
+ video_iou_threshold,video_conf_threshold],
221
+ outputs=[video_output,fps_video])
222
+ video_button_track.click(inference2, inputs=[video_input,video_drop,
223
  video_iou_threshold,video_conf_threshold],
224
  outputs=[video_output,fps_video])
225