Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -32,7 +32,7 @@ import imageio # Added for final video rendering
|
|
32 |
|
33 |
# FastRTC imports
|
34 |
from fastrtc import WebRTC, get_turn_credentials
|
35 |
-
from fastrtc.utils import AdditionalOutputs
|
36 |
|
37 |
# Original project imports
|
38 |
from pipeline import CausalInferencePipeline
|
@@ -297,7 +297,7 @@ def video_generation_handler(prompt, seed, enable_torch_compile, enable_fp8, use
|
|
297 |
print(f"⚠️ Could not save final video: {e}")
|
298 |
|
299 |
yield frame_bgr, AdditionalOutputs(status_html, video_update, gr.update(visible=False))
|
300 |
-
yield CloseStream("🎉 Video generation completed successfully!")
|
301 |
return
|
302 |
else: # Regular frames - simpler status
|
303 |
status_html = (
|
@@ -321,7 +321,7 @@ def video_generation_handler(prompt, seed, enable_torch_compile, enable_fp8, use
|
|
321 |
print(f"✅ Video generation completed! Total frames yielded: {total_frames_yielded}")
|
322 |
|
323 |
# Signal completion
|
324 |
-
yield CloseStream("🎉 Video generation completed successfully!")
|
325 |
|
326 |
# --- Gradio UI Layout ---
|
327 |
with gr.Blocks(theme=gr.themes.Soft(), title="Self-Forcing FastRTC Demo") as demo:
|
|
|
32 |
|
33 |
# FastRTC imports
|
34 |
from fastrtc import WebRTC, get_turn_credentials
|
35 |
+
from fastrtc.utils import AdditionalOutputs #, CloseStream
|
36 |
|
37 |
# Original project imports
|
38 |
from pipeline import CausalInferencePipeline
|
|
|
297 |
print(f"⚠️ Could not save final video: {e}")
|
298 |
|
299 |
yield frame_bgr, AdditionalOutputs(status_html, video_update, gr.update(visible=False))
|
300 |
+
# yield CloseStream("🎉 Video generation completed successfully!")
|
301 |
return
|
302 |
else: # Regular frames - simpler status
|
303 |
status_html = (
|
|
|
321 |
print(f"✅ Video generation completed! Total frames yielded: {total_frames_yielded}")
|
322 |
|
323 |
# Signal completion
|
324 |
+
# yield CloseStream("🎉 Video generation completed successfully!")
|
325 |
|
326 |
# --- Gradio UI Layout ---
|
327 |
with gr.Blocks(theme=gr.themes.Soft(), title="Self-Forcing FastRTC Demo") as demo:
|