Spaces:
Runtime error
Runtime error
Download app.py from Coddieharsh/tennis-vision: direct link, hf CLI and curl.
- Browser
- Download file 939 Bytes
-
https://huggingface.co/spaces/Coddieharsh/tennis-vision/resolve/main/app.py
- Command line
-
hf download hf://spaces/Coddieharsh/tennis-vision/app.py
-
curl -L -o app.py https://huggingface.co/spaces/Coddieharsh/tennis-vision/resolve/main/app.py
939 Bytes
| import gradio as gr | |
| import urllib.request | |
| import os | |
| # Download video if not exists | |
| video_path = "output_video.mp4" | |
| if not os.path.exists(video_path): | |
| print("Downloading video...") | |
| urllib.request.urlretrieve( | |
| "https://raw.githubusercontent.com/HarshTomar1234/Tennis-Vision/main/output_videos/output_video.mp4", | |
| video_path | |
| ) | |
| print("Download complete!") | |
| with gr.Blocks(title="Tennis Vision") as demo: | |
| gr.Markdown(""" | |
| # πΎ Tennis Vision match analysis using CV skills | |
| **Tennis match analysis with 95% player detection and real-time ball tracking** | |
| β YOLOv8 player detection β’ β Custom ball tracking β’ β Shot classification (12 types) β’ β Mini-court visualization | |
| [π View Full Project on GitHub](https://github.com/HarshTomar1234/Tennis-Vision) | |
| """) | |
| gr.Video(value=video_path, label="Tennis Vision Analysis Demo", autoplay=True) | |
| demo.launch() |