Spaces:
Sleeping
Sleeping
Commit
·
55fe523
1
Parent(s):
531d444
football analysis using CV skills
Browse files- app.py +9 -8
- requirements.txt.txt +1 -1
app.py
CHANGED
|
@@ -1,16 +1,17 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
-
import
|
| 3 |
import os
|
| 4 |
|
| 5 |
-
# Download video from Google Drive
|
| 6 |
video_path = "output_video.avi"
|
| 7 |
if not os.path.exists(video_path):
|
| 8 |
-
print("Downloading video
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
|
|
|
| 14 |
print("Download complete!")
|
| 15 |
|
| 16 |
with gr.Blocks(title="Field Fusion") as demo:
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
+
import requests
|
| 3 |
import os
|
| 4 |
|
| 5 |
+
# Download video from Google Drive
|
| 6 |
video_path = "output_video.avi"
|
| 7 |
if not os.path.exists(video_path):
|
| 8 |
+
print("Downloading video...")
|
| 9 |
+
file_id = "1wTchos7ReXpUz1dJU-Bu2f04G9KvDp16"
|
| 10 |
+
url = f"https://drive.google.com/uc?export=download&id={file_id}&confirm=t"
|
| 11 |
+
response = requests.get(url, stream=True)
|
| 12 |
+
with open(video_path, 'wb') as f:
|
| 13 |
+
for chunk in response.iter_content(chunk_size=8192):
|
| 14 |
+
f.write(chunk)
|
| 15 |
print("Download complete!")
|
| 16 |
|
| 17 |
with gr.Blocks(title="Field Fusion") as demo:
|
requirements.txt.txt
CHANGED
|
@@ -1,2 +1,2 @@
|
|
| 1 |
gradio
|
| 2 |
-
|
|
|
|
| 1 |
gradio
|
| 2 |
+
requests
|