Aquibjaved's picture
Update app.py
a36a1d6 verified
raw
history blame contribute delete
633 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 # 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.Video(label="Upload a Video")
video_output = gr.Video(label="Processed Video")
# Create and launch Gradio interface
gr.Interface(fn=gradio_video_processing, inputs=video_input, outputs=video_output, title="Fight Detection in Video").launch()