Update app.py
Browse files
app.py
CHANGED
|
@@ -8,7 +8,7 @@ import av
|
|
| 8 |
import gradio as gr
|
| 9 |
import spaces
|
| 10 |
import torch
|
| 11 |
-
from fastrtc import AdditionalOutputs, ReplyOnPause, WebRTC, WebRTCData,
|
| 12 |
from gradio.processing_utils import save_audio_to_cache
|
| 13 |
from gradio.utils import get_upload_folder
|
| 14 |
from transformers import AutoModelForImageTextToText, AutoProcessor
|
|
@@ -239,8 +239,8 @@ with gr.Blocks() as demo:
|
|
| 239 |
modality="audio",
|
| 240 |
mode="send",
|
| 241 |
variant="textbox",
|
| 242 |
-
rtc_configuration=
|
| 243 |
-
server_rtc_configuration=
|
| 244 |
)
|
| 245 |
with gr.Row():
|
| 246 |
with gr.Accordion(label="Additional Inputs"):
|
|
|
|
| 8 |
import gradio as gr
|
| 9 |
import spaces
|
| 10 |
import torch
|
| 11 |
+
from fastrtc import AdditionalOutputs, ReplyOnPause, WebRTC, WebRTCData, get_cloudflare_turn_credentials_async, get_cloudflare_turn_credentials, audio_to_int16
|
| 12 |
from gradio.processing_utils import save_audio_to_cache
|
| 13 |
from gradio.utils import get_upload_folder
|
| 14 |
from transformers import AutoModelForImageTextToText, AutoProcessor
|
|
|
|
| 239 |
modality="audio",
|
| 240 |
mode="send",
|
| 241 |
variant="textbox",
|
| 242 |
+
rtc_configuration=get_cloudflare_turn_credentials_async,
|
| 243 |
+
server_rtc_configuration=get_cloudflare_turn_credentials(ttl=3_600 * 24 * 30),
|
| 244 |
)
|
| 245 |
with gr.Row():
|
| 246 |
with gr.Accordion(label="Additional Inputs"):
|