Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -363,19 +363,13 @@ with gr.Blocks(theme=gr.themes.Soft(), title="Self-Forcing FastRTC Demo") as dem
|
|
| 363 |
gr.Markdown("### 📺 Live Video Stream")
|
| 364 |
gr.Markdown("*Click 'Start Generation' to begin streaming*")
|
| 365 |
|
| 366 |
-
try:
|
| 367 |
-
rtc_config = get_turn_credentials(hf_token=f"{os.environ.get('HF_TOKEN')}")
|
| 368 |
-
except Exception as e:
|
| 369 |
-
print(f"Warning: Could not get TURN credentials: {e}")
|
| 370 |
-
rtc_config = None
|
| 371 |
-
|
| 372 |
webrtc_output = WebRTC(
|
| 373 |
label="Generated Video Stream",
|
| 374 |
modality="video",
|
| 375 |
mode="receive", # Server sends video to client
|
| 376 |
height=480,
|
| 377 |
width=832,
|
| 378 |
-
rtc_configuration=
|
| 379 |
elem_id="video_stream"
|
| 380 |
)
|
| 381 |
|
|
|
|
| 363 |
gr.Markdown("### 📺 Live Video Stream")
|
| 364 |
gr.Markdown("*Click 'Start Generation' to begin streaming*")
|
| 365 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 366 |
webrtc_output = WebRTC(
|
| 367 |
label="Generated Video Stream",
|
| 368 |
modality="video",
|
| 369 |
mode="receive", # Server sends video to client
|
| 370 |
height=480,
|
| 371 |
width=832,
|
| 372 |
+
rtc_configuration=get_turn_credentials(),
|
| 373 |
elem_id="video_stream"
|
| 374 |
)
|
| 375 |
|