Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -89,10 +89,17 @@ def generate_video():
|
|
89 |
if not image_files:
|
90 |
raise ValueError("No images found in folder!")
|
91 |
|
92 |
-
|
93 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
94 |
video_path = f"/tmp/video_{uuid.uuid4().hex}.mp4"
|
95 |
-
|
96 |
for img in image_files:
|
97 |
os.remove(img)
|
98 |
|
|
|
89 |
if not image_files:
|
90 |
raise ValueError("No images found in folder!")
|
91 |
|
92 |
+
|
93 |
+
for id in range(len(lines)):
|
94 |
+
video_func(id)
|
95 |
+
clips = []
|
96 |
+
for id in range(len(lines)):
|
97 |
+
clip = VideoFileClip(f"clip{id}.mp4")
|
98 |
+
clips.append(clip)
|
99 |
+
|
100 |
+
final_video = concatenate_videoclips(clips)
|
101 |
video_path = f"/tmp/video_{uuid.uuid4().hex}.mp4"
|
102 |
+
final_video.write_videofile(video_path", fps=24)
|
103 |
for img in image_files:
|
104 |
os.remove(img)
|
105 |
|