Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -55,15 +55,11 @@ def generate_fun_music(prompt, output_music_file="fun_music.wav"):
|
|
55 |
return output_music_file
|
56 |
|
57 |
|
58 |
-
# Create Video from Generated Images
|
59 |
def generate_text_video(script):
|
60 |
image_paths = create_images_from_script(script)
|
61 |
-
|
62 |
-
|
63 |
-
image_clip = ImageClip(img_path).set_duration(3).set_position(('center', 'center'))
|
64 |
-
clips.append(image_clip)
|
65 |
-
final_video = concatenate_videoclips(clips, method="compose")
|
66 |
-
final_video.write_videofile("/tmp/final_video.mp4", fps=24)
|
67 |
return "/tmp/final_video.mp4"
|
68 |
|
69 |
# Combine Audio and Video
|
|
|
55 |
return output_music_file
|
56 |
|
57 |
|
58 |
+
# Create Video from Generated Images Using ToonCrafter
|
59 |
def generate_text_video(script):
|
60 |
image_paths = create_images_from_script(script)
|
61 |
+
tooncrafter_animation = tooncrafter.generate_animation(image_paths)
|
62 |
+
tooncrafter_animation.write_videofile("/tmp/final_video.mp4", fps=24)
|
|
|
|
|
|
|
|
|
63 |
return "/tmp/final_video.mp4"
|
64 |
|
65 |
# Combine Audio and Video
|