Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,15 +1,15 @@
|
|
| 1 |
-
|
| 2 |
import gradio as gr
|
| 3 |
import time
|
| 4 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
|
| 6 |
-
5 def generate_video(prompt: str):
|
| 7 |
-
6 # Create a 3-second clip of your prompt text
|
| 8 |
-
7 clip = TextClip(prompt, fontsize=70, color='white', bg_color='black', size=(640,360))
|
| 9 |
-
8 clip = clip.set_duration(3)
|
| 10 |
-
9 output_path = "out.mp4"
|
| 11 |
-
10 clip.write_videofile(output_path, fps=24, codec="libx264")
|
| 12 |
-
11 return output_path, output_path
|
| 13 |
|
| 14 |
|
| 15 |
with gr.Blocks() as demo:
|
|
|
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
import time
|
| 3 |
+
from moviepy.editor import TextClip, concatenate_videoclips
|
| 4 |
+
|
| 5 |
+
def generate_video(prompt: str):
|
| 6 |
+
# Create a 3-second clip of your prompt text
|
| 7 |
+
clip = TextClip(prompt, fontsize=70, color='white', bg_color='black', size=(640,360))
|
| 8 |
+
clip = clip.set_duration(3)
|
| 9 |
+
output_path = "out.mp4"
|
| 10 |
+
clip.write_videofile(output_path, fps=24, codec="libx264")
|
| 11 |
+
return output_path, output_path
|
| 12 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
|
| 14 |
|
| 15 |
with gr.Blocks() as demo:
|