Spaces:
Sleeping
Sleeping
File size: 1,073 Bytes
e54e925 dab8252 e54e925 dab8252 e54e925 dab8252 e54e925 dab8252 e54e925 dab8252 e54e925 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# lbw_review_system/app.py
import gradio as gr
from upload_review import analyze_uploaded_video
from live_review import analyze_live_video
upload_interface = gr.Interface(
fn=analyze_uploaded_video,
inputs=gr.Video(label="Upload LBW Appeal Video"),
outputs=[
gr.Textbox(label="Final Decision"),
gr.Textbox(label="Summary Explanation"),
gr.Video(label="Annotated Replay")
],
title="Page 1: Upload LBW Review",
description="DRS-based LBW decision system with video analysis and annotated verdict."
)
live_interface = gr.Interface(
fn=analyze_live_video,
inputs=gr.Video(label="Live Buffered Camera Feed (4–6s)"),
outputs=[
gr.Textbox(label="Live Decision"),
gr.Textbox(label="Explanation"),
gr.Video(label="Annotated Replay")
],
title="Page 2: Live LBW Review",
description="On-field LBW review based on live buffer feed."
)
app = gr.TabbedInterface([upload_interface, live_interface], ["Upload LBW Review", "Live LBW Review"])
if __name__ == "__main__":
app.launch()
|