Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -12,19 +12,17 @@ pipe.enable_model_cpu_offload()
|
|
| 12 |
pipe.enable_vae_slicing()
|
| 13 |
|
| 14 |
@spaces.GPU(duration=250)
|
| 15 |
-
def generate(prompt
|
| 16 |
-
video_frames = pipe(prompt, num_inference_steps, num_frames).frames
|
| 17 |
video_path = export_to_video(video_frames)
|
| 18 |
return video_path
|
| 19 |
|
| 20 |
prompt = gr.Textbox(label="Enter prompt to generate a video")
|
| 21 |
-
num_inference_steps = gr.Slider(10, 50, value=25)
|
| 22 |
-
num_frames = gr.Slider(100, 500, value=200)
|
| 23 |
|
| 24 |
interface = gr.Interface(
|
| 25 |
generate,
|
| 26 |
inputs=[prompt, num_inference_steps, num_frames],
|
| 27 |
-
examples=[["Astronaut riding a horse"
|
| 28 |
outputs="video",
|
| 29 |
cache_examples=False,
|
| 30 |
theme="soft"
|
|
|
|
| 12 |
pipe.enable_vae_slicing()
|
| 13 |
|
| 14 |
@spaces.GPU(duration=250)
|
| 15 |
+
def generate(prompt):
|
| 16 |
+
video_frames = pipe(prompt, num_inference_steps=25, num_frames=10).frames
|
| 17 |
video_path = export_to_video(video_frames)
|
| 18 |
return video_path
|
| 19 |
|
| 20 |
prompt = gr.Textbox(label="Enter prompt to generate a video")
|
|
|
|
|
|
|
| 21 |
|
| 22 |
interface = gr.Interface(
|
| 23 |
generate,
|
| 24 |
inputs=[prompt, num_inference_steps, num_frames],
|
| 25 |
+
examples=[["Astronaut riding a horse"], ["Darth vader surfing in waves"]],
|
| 26 |
outputs="video",
|
| 27 |
cache_examples=False,
|
| 28 |
theme="soft"
|