File size: 664 Bytes
cba28f7
 
 
 
 
c920080
b75a3be
c920080
cba28f7
 
 
 
c920080
cba28f7
 
 
 
 
a0991f0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import gradio as gr
from video_processor import process_video
import os

def analyze_lbw(video):
    """Analyze a video for LBW detection, return processed video path and decision."""
    output_path, decision = process_video(video)  # Updated to handle multiple returns
    return output_path, decision

app = gr.Interface(
    fn=analyze_lbw,
    inputs=gr.Video(label="Upload Cricket Clip"),
    outputs=[gr.Video(label="LBW Analysis Output"), gr.Textbox(label="Decision")],
    title="Smart LBW Decision System",
    description="Upload a short video to analyze LBW using AI-powered object detection and tracking"
)

if __name__ == "__main__":
    app.launch()