Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -11,8 +11,9 @@ INFERENCE_URL = "https://moonmath-ai-dev--moonmath-i2v-backend-moonmathinference
|
|
| 11 |
|
| 12 |
# -------- small helpers --------
|
| 13 |
def _save_video_bytes(data: bytes, tag: str) -> str:
|
| 14 |
-
os
|
| 15 |
-
|
|
|
|
| 16 |
with open(path, "wb") as f:
|
| 17 |
f.write(data)
|
| 18 |
return path
|
|
|
|
| 11 |
|
| 12 |
# -------- small helpers --------
|
| 13 |
def _save_video_bytes(data: bytes, tag: str) -> str:
|
| 14 |
+
import os, time
|
| 15 |
+
os.makedirs("/tmp", exist_ok=True)
|
| 16 |
+
path = f"/tmp/{tag}_{int(time.time())}.mp4" # <- /tmp
|
| 17 |
with open(path, "wb") as f:
|
| 18 |
f.write(data)
|
| 19 |
return path
|