Spaces:
Sleeping
Sleeping
Delete app.py
Browse files
app.py
DELETED
@@ -1,29 +0,0 @@
|
|
1 |
-
import gradio as gr
|
2 |
-
from video_processor import process_live_video, process_uploaded_video
|
3 |
-
|
4 |
-
def analyze_live_video():
|
5 |
-
result_path, decision = process_live_video()
|
6 |
-
return result_path, decision
|
7 |
-
|
8 |
-
def analyze_uploaded_video(video):
|
9 |
-
result_path, decision = process_uploaded_video(video)
|
10 |
-
return result_path, decision
|
11 |
-
|
12 |
-
with gr.Blocks(title="Smart LBW DRS System") as demo:
|
13 |
-
gr.Markdown("# 🏏 Smart LBW DRS System")
|
14 |
-
with gr.Tab("📡 Live Match Review"):
|
15 |
-
gr.Markdown("Automatically captures last 10 seconds on LBW appeal and analyzes it.")
|
16 |
-
live_btn = gr.Button("Analyze Last 10s")
|
17 |
-
live_video = gr.Video(label="AI Annotated Replay")
|
18 |
-
live_text = gr.Textbox(label="Decision", interactive=False)
|
19 |
-
live_btn.click(fn=analyze_live_video, outputs=[live_video, live_text])
|
20 |
-
|
21 |
-
with gr.Tab("📤 Upload Review Clip"):
|
22 |
-
gr.Markdown("Upload a short clip with an LBW appeal.")
|
23 |
-
upload_input = gr.Video(label="Input Video")
|
24 |
-
upload_btn = gr.Button("Analyze Upload")
|
25 |
-
upload_output = gr.Video(label="AI Annotated Replay")
|
26 |
-
upload_text = gr.Textbox(label="Decision", interactive=False)
|
27 |
-
upload_btn.click(fn=analyze_uploaded_video, inputs=[upload_input], outputs=[upload_output, upload_text])
|
28 |
-
|
29 |
-
demo.launch()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|