Spaces:
Runtime error
Runtime error
Upload 2 files
Browse files
app.py
CHANGED
|
@@ -4,7 +4,7 @@ import tempfile
|
|
| 4 |
import shutil
|
| 5 |
import os
|
| 6 |
|
| 7 |
-
#
|
| 8 |
os.environ['YOLO_CONFIG_DIR'] = '/tmp'
|
| 9 |
|
| 10 |
# Initialize the YOLO model
|
|
@@ -23,6 +23,7 @@ def process_video(video):
|
|
| 23 |
|
| 24 |
# Define the output video path
|
| 25 |
output_path = f"{results[0].save_dir}/tracked_video.mp4"
|
|
|
|
| 26 |
|
| 27 |
return output_path
|
| 28 |
|
|
|
|
| 4 |
import shutil
|
| 5 |
import os
|
| 6 |
|
| 7 |
+
# Set YOLO config directory to avoid permission issues
|
| 8 |
os.environ['YOLO_CONFIG_DIR'] = '/tmp'
|
| 9 |
|
| 10 |
# Initialize the YOLO model
|
|
|
|
| 23 |
|
| 24 |
# Define the output video path
|
| 25 |
output_path = f"{results[0].save_dir}/tracked_video.mp4"
|
| 26 |
+
print(f"Tracked video saved to: {output_path}")
|
| 27 |
|
| 28 |
return output_path
|
| 29 |
|