File size: 633 Bytes
eb376f2
 
 
 
 
f78faf6
eb376f2
 
 
 
3d0f1e4
a36a1d6
eb376f2
 
 
f78faf6
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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()