Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -24,13 +24,13 @@ def generate_video(prompt: str) -> str:
|
|
24 |
# Offloading moves weights automatically; just call the pipeline
|
25 |
output = pipe(
|
26 |
prompt=prompt,
|
27 |
-
num_inference_steps=
|
28 |
-
num_frames=
|
29 |
)
|
30 |
frames = output.frames[0]
|
31 |
|
32 |
# Export frames to MP4 (H.264) for browser playback
|
33 |
-
return export_to_video(frames, "generated.mp4", fps=
|
34 |
|
35 |
# 3. Build the Gradio interface
|
36 |
with gr.Blocks(title="CogVideoX Text-to-Video") as demo:
|
|
|
24 |
# Offloading moves weights automatically; just call the pipeline
|
25 |
output = pipe(
|
26 |
prompt=prompt,
|
27 |
+
num_inference_steps=3,
|
28 |
+
num_frames=50
|
29 |
)
|
30 |
frames = output.frames[0]
|
31 |
|
32 |
# Export frames to MP4 (H.264) for browser playback
|
33 |
+
return export_to_video(frames, "generated.mp4", fps=15)
|
34 |
|
35 |
# 3. Build the Gradio interface
|
36 |
with gr.Blocks(title="CogVideoX Text-to-Video") as demo:
|