Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -14,7 +14,7 @@ from fastrtc import (
|
|
14 |
WebRTC,
|
15 |
WebRTCData,
|
16 |
WebRTCError,
|
17 |
-
|
18 |
get_stt_model,
|
19 |
)
|
20 |
from gradio.utils import get_space
|
@@ -125,10 +125,7 @@ with gr.Blocks(css=css) as demo:
|
|
125 |
modality="audio",
|
126 |
mode="send",
|
127 |
variant="textbox",
|
128 |
-
rtc_configuration=
|
129 |
-
server_rtc_configuration=get_hf_turn_credentials(ttl=3_600 * 24 * 30)
|
130 |
-
if get_space()
|
131 |
-
else None,
|
132 |
)
|
133 |
webrtc.stream(
|
134 |
ReplyOnPause(response), # type: ignore
|
|
|
14 |
WebRTC,
|
15 |
WebRTCData,
|
16 |
WebRTCError,
|
17 |
+
get_cloudflare_turn_credentials,
|
18 |
get_stt_model,
|
19 |
)
|
20 |
from gradio.utils import get_space
|
|
|
125 |
modality="audio",
|
126 |
mode="send",
|
127 |
variant="textbox",
|
128 |
+
rtc_configuration=get_cloudflare_turn_credentials if get_space() else None,
|
|
|
|
|
|
|
129 |
)
|
130 |
webrtc.stream(
|
131 |
ReplyOnPause(response), # type: ignore
|