Irpan commited on
Commit
de4d7aa
·
1 Parent(s): 219eb27
Files changed (1) hide show
  1. app.py +10 -3
app.py CHANGED
@@ -1,6 +1,7 @@
1
  import gradio as gr
2
 
3
  import os
 
4
 
5
  from utils import read_video, save_video
6
  from trackers import Tracker
@@ -84,11 +85,17 @@ def process_video(input_video):
84
 
85
 
86
  # Gradio Interface
 
 
 
 
 
87
  interface = gr.Interface(fn=process_video,
88
- inputs=gr.Video(label="Upload Video (mp4, avi, mov)"),
89
  outputs=gr.Video(label="Processed Video"),
 
90
  live=False, # No live update to avoid real-time processing issues
91
- title="Football Match Analytics with YOLO and OpenCV",
92
- description="This tool processes football game videos to track player movements, team assignments, ball possession, speed, distance, and camera movement. <br> Original Reference: https://www.youtube.com/watch?v=neBZ6huolkg&t=15083s") # Allow users to download the processed video
93
 
94
  interface.launch(debug=True, show_error = True)
 
1
  import gradio as gr
2
 
3
  import os
4
+ import numpy as np
5
 
6
  from utils import read_video, save_video
7
  from trackers import Tracker
 
85
 
86
 
87
  # Gradio Interface
88
+ title="Football Match Analytics with YOLO and OpenCV"
89
+ description="This tool processes football game videos to track player movements, team assignments, ball possession, speed, distance, and camera movement. <br> Original Reference: https://www.youtube.com/watch?v=neBZ6huolkg"
90
+
91
+ examples = ["input_videos/121364_0_small.mp4"]
92
+
93
  interface = gr.Interface(fn=process_video,
94
+ inputs=gr.Video(label="Upload Video (mp4, avi, mov) Max: 30sec"),
95
  outputs=gr.Video(label="Processed Video"),
96
+ examples=examples,
97
  live=False, # No live update to avoid real-time processing issues
98
+ title=title,
99
+ description=description) # Allow users to download the processed video
100
 
101
  interface.launch(debug=True, show_error = True)