Spaces:
Runtime error
Runtime error
File size: 769 Bytes
bd2ff06 fca2efd bd2ff06 ceed5f5 fca2efd dfb84ad fca2efd dfb84ad fca2efd ceed5f5 fca2efd bd2ff06 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
import gradio as gr
from inference import inference
input_video = gr.Video(mirror_webcam=False)
dd_model = gr.Dropdown(choices=["YoloV7"], value="YoloV7", label="Model")
cb_motion_estimation = gr.Checkbox(value=True, label="Track camera movement")
cb_path_draw = gr.Checkbox(value=True, label="Draw objects paths")
dd_track_points = gr.Dropdown(
choices=["Boxes", "Centroid"], value="Boxes", label="Detections style"
)
slide_threshold = gr.Slider(minimum=0, maximum=1, value=0.25, label="Model confidence threshold")
inputs = [
input_video,
dd_model,
cb_motion_estimation,
cb_path_draw,
dd_track_points,
slide_threshold,
]
outputs = "playablevideo"
iface = gr.Interface(fn=inference, inputs=inputs, outputs=outputs)
iface.launch()
|