Spaces:
Runtime error
Runtime error
Commit
·
049f113
1
Parent(s):
5d8217d
app.py
CHANGED
@@ -46,9 +46,11 @@ def anim(f_promt, s_promt, stability_key):
|
|
46 |
repo_dir = os.getenv('HF_COMET_ROOT_PATH', '/')
|
47 |
|
48 |
# Define output folder path
|
49 |
-
output_dir = os.path.join(repo_dir, "output")
|
50 |
image_path = "/tmp/frames/"
|
|
|
51 |
|
|
|
|
|
52 |
# Render each frame of animation
|
53 |
for idx, frame in enumerate(animator.render()):
|
54 |
file_path = os.path.join(output_dir, f"frame_{idx:05d}.png")
|
|
|
46 |
repo_dir = os.getenv('HF_COMET_ROOT_PATH', '/')
|
47 |
|
48 |
# Define output folder path
|
|
|
49 |
image_path = "/tmp/frames/"
|
50 |
+
output_dir = os.path.join(image_path, "output")
|
51 |
|
52 |
+
if not os.path.exists(output_dir):
|
53 |
+
os.makedirs(output_dir)
|
54 |
# Render each frame of animation
|
55 |
for idx, frame in enumerate(animator.render()):
|
56 |
file_path = os.path.join(output_dir, f"frame_{idx:05d}.png")
|