Update app.py
Browse files
app.py
CHANGED
|
@@ -40,12 +40,12 @@ def generate_video():
|
|
| 40 |
print(lines)
|
| 41 |
image_olst=[]
|
| 42 |
for id in range(len(lines)):
|
| 43 |
-
create_text_image(lines[id],id
|
| 44 |
image_files = sorted(glob.glob(os.path.join(image_folder, "*.png")))
|
| 45 |
if not image_files:
|
| 46 |
raise ValueError("No images found in folder!")
|
| 47 |
|
| 48 |
-
clips = [ImageClip(m).set_duration(
|
| 49 |
video = concatenate_videoclips(clips, method="compose")
|
| 50 |
video_path = f"/tmp/video_{uuid.uuid4().hex}.mp4"
|
| 51 |
video.write_videofile(video_path, fps=24)
|
|
|
|
| 40 |
print(lines)
|
| 41 |
image_olst=[]
|
| 42 |
for id in range(len(lines)):
|
| 43 |
+
create_text_image(lines[id],id,image_olst)
|
| 44 |
image_files = sorted(glob.glob(os.path.join(image_folder, "*.png")))
|
| 45 |
if not image_files:
|
| 46 |
raise ValueError("No images found in folder!")
|
| 47 |
|
| 48 |
+
clips = [ImageClip(m).set_duration(5) for m in image_files]
|
| 49 |
video = concatenate_videoclips(clips, method="compose")
|
| 50 |
video_path = f"/tmp/video_{uuid.uuid4().hex}.mp4"
|
| 51 |
video.write_videofile(video_path, fps=24)
|