Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -3,13 +3,17 @@ from video_processor import process_video
|
|
3 |
import os
|
4 |
|
5 |
def analyze_lbw(video):
|
|
|
6 |
output_path = process_video(video)
|
7 |
-
|
|
|
|
|
|
|
8 |
|
9 |
app = gr.Interface(
|
10 |
fn=analyze_lbw,
|
11 |
inputs=gr.Video(label="Upload Cricket Clip"),
|
12 |
-
outputs=gr.Video(label="LBW Analysis Output"),
|
13 |
title="Smart LBW Decision System",
|
14 |
description="Upload a short video to analyze LBW using AI-powered object detection and tracking"
|
15 |
)
|
|
|
3 |
import os
|
4 |
|
5 |
def analyze_lbw(video):
|
6 |
+
"""Analyze a video for LBW detection, return processed video path and decision."""
|
7 |
output_path = process_video(video)
|
8 |
+
# Extract decision from the last processed frame (assuming it's the final decision)
|
9 |
+
# This requires the video_processor to return or modify to track the decision
|
10 |
+
decision = "Pending" # Placeholder; will be updated in video_processor
|
11 |
+
return output_path, decision
|
12 |
|
13 |
app = gr.Interface(
|
14 |
fn=analyze_lbw,
|
15 |
inputs=gr.Video(label="Upload Cricket Clip"),
|
16 |
+
outputs=[gr.Video(label="LBW Analysis Output"), gr.Textbox(label="Decision")],
|
17 |
title="Smart LBW Decision System",
|
18 |
description="Upload a short video to analyze LBW using AI-powered object detection and tracking"
|
19 |
)
|