Spaces:
Sleeping
Sleeping
Commit ·
2603e4f
1
Parent(s): 1824737
Fix: Use /tmp for temp and outputs directories
Browse files- Changed TEMP_DIR from /app/temp to /tmp/temp
- Changed OUTPUTS_DIR from /app/outputs to /tmp/outputs
- Fixes PermissionError when saving uploaded videos
- Ensures all file operations use writable locations in containers
- highlights_api.py +3 -3
highlights_api.py
CHANGED
|
@@ -90,9 +90,9 @@ completed_jobs = {}
|
|
| 90 |
import tempfile
|
| 91 |
import stat
|
| 92 |
|
| 93 |
-
# Use
|
| 94 |
-
TEMP_DIR = os.path.join(
|
| 95 |
-
OUTPUTS_DIR = os.path.join(
|
| 96 |
|
| 97 |
# Create directories with proper permissions
|
| 98 |
os.makedirs(OUTPUTS_DIR, mode=0o755, exist_ok=True)
|
|
|
|
| 90 |
import tempfile
|
| 91 |
import stat
|
| 92 |
|
| 93 |
+
# Use /tmp directory for HuggingFace Spaces compatibility (writable location)
|
| 94 |
+
TEMP_DIR = os.path.join("/tmp", "temp")
|
| 95 |
+
OUTPUTS_DIR = os.path.join("/tmp", "outputs")
|
| 96 |
|
| 97 |
# Create directories with proper permissions
|
| 98 |
os.makedirs(OUTPUTS_DIR, mode=0o755, exist_ok=True)
|