Coddieharsh commited on
Commit
a79962e
Β·
1 Parent(s): 0137b52

Tennis match analysis demo

Browse files
Files changed (1) hide show
  1. app.py +16 -20
app.py CHANGED
@@ -1,24 +1,20 @@
1
  import gradio as gr
2
 
3
- # Video URL from your GitHub repo
4
- output_video = "https://raw.githubusercontent.com/HarshTomar1234/Tennis-Vision/main/output_videos/output_video.mp4"
5
-
6
- demo = gr.Interface(
7
- fn=lambda: output_video,
8
- inputs=[],
9
- outputs=gr.Video(label="Tennis Vision Analysis Demo"),
10
- title="🎾 Tennis Vision ",
11
- description="""
12
- **Tennis match analysis with 95% player detection and real-time ball tracking**
13
-
14
- βœ… YOLOv8 player detection
15
- βœ… Custom ball tracking model
16
- βœ… Shot classification (12 types)
17
- βœ… Mini-court visualization
18
-
19
- [πŸ“‚ View Full Project on GitHub](https://github.com/HarshTomar1234/Tennis-Vision)
20
- """,
21
- flagging_mode="never"
22
- )
23
 
24
  demo.launch()
 
1
  import gradio as gr
2
 
3
+ with gr.Blocks(title="Tennis Vision") as demo:
4
+ gr.Markdown("""
5
+ # 🎾 Tennis Vision match analysis using CV skills
6
+
7
+ **Tennis match analysis with 95% player detection and real-time ball tracking**
8
+
9
+ βœ… YOLOv8 player detection β€’ βœ… Custom ball tracking β€’ βœ… Shot classification (12 types) β€’ βœ… Mini-court visualization
10
+
11
+ [πŸ“‚ View Full Project on GitHub](https://github.com/HarshTomar1234/Tennis-Vision)
12
+ """)
13
+
14
+ gr.Video(
15
+ value="https://raw.githubusercontent.com/HarshTomar1234/Tennis-Vision/main/output_videos/output_video.mp4",
16
+ label="Tennis Vision Analysis Demo",
17
+ autoplay=True
18
+ )
 
 
 
 
19
 
20
  demo.launch()