| import gradio as gr | |
| from API_Model import predict_gradio | |
| iface = gr.Interface( | |
| fn=predict_gradio, | |
| inputs=gr.Video(label="Upload Video (mp4)"), | |
| outputs=[ | |
| gr.JSON(label="Prediction Results"), | |
| gr.Video(label="Summary Video") | |
| ], | |
| title="VideoMAE Action Classifier", | |
| description="Detect Goal / Card / Substitution segments in a football video using VideoMAE" | |
| ) | |
| iface.launch() | |