Spaces:
Sleeping
Sleeping
| # 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() | |