Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -4,7 +4,6 @@ import time
|
|
4 |
import gradio as gr
|
5 |
import numpy as np
|
6 |
from dotenv import load_dotenv
|
7 |
-
from elevenlabs import ElevenLabs
|
8 |
from distil_whisper_fastrtc import get_stt_model
|
9 |
from fastapi import FastAPI
|
10 |
from fastrtc import (
|
@@ -66,10 +65,9 @@ stream = Stream(
|
|
66 |
additional_outputs_handler=lambda a, b: b,
|
67 |
additional_inputs=[chatbot],
|
68 |
additional_outputs=[chatbot],
|
69 |
-
rtc_configuration=get_twilio_turn_credentials() if get_space() else None,
|
70 |
concurrency_limit=5 if get_space() else None,
|
71 |
time_limit=90 if get_space() else None,
|
72 |
-
ui_args={"title": "LLM Voice Chat (Powered by Groq,
|
73 |
)
|
74 |
|
75 |
# Mount the STREAM UI to the FastAPI app
|
@@ -85,7 +83,5 @@ if __name__ == "__main__":
|
|
85 |
|
86 |
if (mode := os.getenv("MODE")) == "UI":
|
87 |
stream.ui.launch(server_port=7860)
|
88 |
-
elif mode == "PHONE":
|
89 |
-
stream.fastphone(host="0.0.0.0", port=7860)
|
90 |
else:
|
91 |
stream.ui.launch(server_port=7860)
|
|
|
4 |
import gradio as gr
|
5 |
import numpy as np
|
6 |
from dotenv import load_dotenv
|
|
|
7 |
from distil_whisper_fastrtc import get_stt_model
|
8 |
from fastapi import FastAPI
|
9 |
from fastrtc import (
|
|
|
65 |
additional_outputs_handler=lambda a, b: b,
|
66 |
additional_inputs=[chatbot],
|
67 |
additional_outputs=[chatbot],
|
|
|
68 |
concurrency_limit=5 if get_space() else None,
|
69 |
time_limit=90 if get_space() else None,
|
70 |
+
ui_args={"title": "LLM Voice Chat (Powered by Groq, and WebRTC ⚡️)"},
|
71 |
)
|
72 |
|
73 |
# Mount the STREAM UI to the FastAPI app
|
|
|
83 |
|
84 |
if (mode := os.getenv("MODE")) == "UI":
|
85 |
stream.ui.launch(server_port=7860)
|
|
|
|
|
86 |
else:
|
87 |
stream.ui.launch(server_port=7860)
|