lbw_drs_app / app.py
dschandra's picture
Update app.py
c920080 verified
raw
history blame
862 Bytes
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 = process_video(video)
# Extract decision from the last processed frame (assuming it's the final decision)
# This requires the video_processor to return or modify to track the decision
decision = "Pending" # Placeholder; will be updated in video_processor
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()