Spaces:
Runtime error
Runtime error
File size: 590 Bytes
ec24258 |
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 |
import os
import cv2
import gradio as gr
from src import run_chain
def video_process(ref_video, test_video, crop_method):
run_chain.main(
ref_video,
test_video,
'output_video.mp4',
crop_method=crop_method
)
return 'output_video.mp4'
demo = gr.Interface(video_process,
inputs = [gr.Video(label='Reference Video'), gr.Video(label='Test Video'), gr.Radio(["YOLO", "Tracker"], label="Crop Method")],
outputs = [gr.PlayableVideo()]
)
if __name__ == "__main__":
demo.launch()
|