Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -527,7 +527,15 @@ def video_generation_handler_example(prompt, seed=42, fps=15):
|
|
527 |
print(f"✅ Video saved to {video_path}")
|
528 |
|
529 |
return video_path
|
530 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
531 |
# --- Gradio UI Layout ---
|
532 |
with gr.Blocks(title="Self-Forcing Streaming Demo") as demo:
|
533 |
gr.Markdown("# 🚀 Self-Forcing Video Generation")
|
@@ -555,7 +563,7 @@ with gr.Blocks(title="Self-Forcing Streaming Demo") as demo:
|
|
555 |
],
|
556 |
inputs=[prompt],
|
557 |
fn=video_generation_handler_example,
|
558 |
-
outputs=[],
|
559 |
cache_examples="lazy",
|
560 |
label="Click any example to generate"
|
561 |
)
|
@@ -581,14 +589,7 @@ with gr.Blocks(title="Self-Forcing Streaming Demo") as demo:
|
|
581 |
with gr.Column(scale=3):
|
582 |
gr.Markdown("### 📺 Video Stream")
|
583 |
|
584 |
-
|
585 |
-
label="Live Stream",
|
586 |
-
streaming=True,
|
587 |
-
loop=True,
|
588 |
-
height=400,
|
589 |
-
autoplay=True,
|
590 |
-
show_label=False
|
591 |
-
)
|
592 |
|
593 |
status_display = gr.HTML(
|
594 |
value=(
|
|
|
527 |
print(f"✅ Video saved to {video_path}")
|
528 |
|
529 |
return video_path
|
530 |
+
|
531 |
+
streaming_video = gr.Video(
|
532 |
+
label="Live Stream",
|
533 |
+
streaming=True,
|
534 |
+
loop=True,
|
535 |
+
height=400,
|
536 |
+
autoplay=True,
|
537 |
+
show_label=False
|
538 |
+
)
|
539 |
# --- Gradio UI Layout ---
|
540 |
with gr.Blocks(title="Self-Forcing Streaming Demo") as demo:
|
541 |
gr.Markdown("# 🚀 Self-Forcing Video Generation")
|
|
|
563 |
],
|
564 |
inputs=[prompt],
|
565 |
fn=video_generation_handler_example,
|
566 |
+
outputs=[streaming_video],
|
567 |
cache_examples="lazy",
|
568 |
label="Click any example to generate"
|
569 |
)
|
|
|
589 |
with gr.Column(scale=3):
|
590 |
gr.Markdown("### 📺 Video Stream")
|
591 |
|
592 |
+
streaming_video.render()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
593 |
|
594 |
status_display = gr.HTML(
|
595 |
value=(
|