Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -86,11 +86,11 @@ def generate_video(prompt, seed, image=None, task_type=None):
|
|
| 86 |
return "Error: Model not initialized.", "{}"
|
| 87 |
|
| 88 |
output = predictor.inference(**kwargs)
|
| 89 |
-
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
|
| 94 |
return output, str(kwargs)
|
| 95 |
|
| 96 |
except Exception as e:
|
|
|
|
| 86 |
return "Error: Model not initialized.", "{}"
|
| 87 |
|
| 88 |
output = predictor.inference(**kwargs)
|
| 89 |
+
save_dir = f"./result/{task_type}"
|
| 90 |
+
os.makedirs(save_dir, exist_ok=True)
|
| 91 |
+
video_out_file = f"{save_dir}/{prompt[:100].replace('/','')}_{int(seed)}.mp4"
|
| 92 |
+
print(f"Generating video, local path: {video_out_file}")
|
| 93 |
+
export_to_video(output, video_out_file, fps=24)
|
| 94 |
return output, str(kwargs)
|
| 95 |
|
| 96 |
except Exception as e:
|