Aquibjaved's picture
Update app.py
eb376f2 verified
raw
history blame
663 Bytes
import gradio as gr
from ProcessVideo import process_video
# Gradio function to handle the video upload and processing
def gradio_video_processing(video):
video_path = video.name # Gradio provides the uploaded video file path
output_video_path = process_video(video_path) # Process the video and get the output path
return output_video_path
# Gradio Interface
video_input = gr.inputs.Video(label="Upload a Video")
video_output = gr.outputs.Video(label="Processed Video with Labels")
# Create and launch Gradio interface
gr.Interface(fn=gradio_video_processing, inputs=video_input, outputs=video_output, title="Fight Detection in Video").launch()