Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
update
Browse files- README.md +1 -1
- app.py +2 -4
- app_gemini_voice.py +2 -18
README.md
CHANGED
@@ -4,7 +4,7 @@ emoji: 🏢
|
|
4 |
colorFrom: indigo
|
5 |
colorTo: indigo
|
6 |
sdk: gradio
|
7 |
-
sdk_version: 5.
|
8 |
app_file: app.py
|
9 |
pinned: false
|
10 |
disable_embedding: true
|
|
|
4 |
colorFrom: indigo
|
5 |
colorTo: indigo
|
6 |
sdk: gradio
|
7 |
+
sdk_version: 5.9.0
|
8 |
app_file: app.py
|
9 |
pinned: false
|
10 |
disable_embedding: true
|
app.py
CHANGED
@@ -1,5 +1,6 @@
|
|
1 |
from utils import get_app
|
2 |
|
|
|
3 |
# Import all demos
|
4 |
from app_cohere import demo as demo_cohere
|
5 |
from app_meta import demo as demo_meta
|
@@ -69,9 +70,6 @@ demo = get_app(
|
|
69 |
if __name__ == "__main__":
|
70 |
demo.queue(
|
71 |
api_open=False,
|
72 |
-
max_size=20
|
73 |
).launch(
|
74 |
-
show_api=False
|
75 |
-
share=True,
|
76 |
-
server_name="0.0.0.0"
|
77 |
)
|
|
|
1 |
from utils import get_app
|
2 |
|
3 |
+
|
4 |
# Import all demos
|
5 |
from app_cohere import demo as demo_cohere
|
6 |
from app_meta import demo as demo_meta
|
|
|
70 |
if __name__ == "__main__":
|
71 |
demo.queue(
|
72 |
api_open=False,
|
|
|
73 |
).launch(
|
74 |
+
show_api=False
|
|
|
|
|
75 |
)
|
app_gemini_voice.py
CHANGED
@@ -173,22 +173,11 @@ class GeminiVoiceChat:
|
|
173 |
</div>
|
174 |
""")
|
175 |
|
176 |
-
rtc_config = {
|
177 |
-
"iceServers": [
|
178 |
-
{"urls": ["stun:stun.l.google.com:19302"]}
|
179 |
-
]
|
180 |
-
}
|
181 |
-
|
182 |
-
try:
|
183 |
-
rtc_config = get_twilio_turn_credentials()
|
184 |
-
except Exception as e:
|
185 |
-
print(f"Using fallback STUN configuration: {e}")
|
186 |
-
|
187 |
webrtc = WebRTC(
|
188 |
label="Conversation",
|
189 |
modality="audio",
|
190 |
mode="send-receive",
|
191 |
-
rtc_configuration=
|
192 |
)
|
193 |
|
194 |
webrtc.stream(
|
@@ -201,12 +190,7 @@ class GeminiVoiceChat:
|
|
201 |
return demo
|
202 |
|
203 |
def launch(self):
|
204 |
-
self.demo.launch(
|
205 |
-
server_name="0.0.0.0",
|
206 |
-
server_port=int(os.environ.get("PORT", 7860)),
|
207 |
-
share=False
|
208 |
-
)
|
209 |
-
|
210 |
# Create and expose the demo instance
|
211 |
def demo():
|
212 |
chat = GeminiVoiceChat()
|
|
|
173 |
</div>
|
174 |
""")
|
175 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
176 |
webrtc = WebRTC(
|
177 |
label="Conversation",
|
178 |
modality="audio",
|
179 |
mode="send-receive",
|
180 |
+
rtc_configuration=get_twilio_turn_credentials()
|
181 |
)
|
182 |
|
183 |
webrtc.stream(
|
|
|
190 |
return demo
|
191 |
|
192 |
def launch(self):
|
193 |
+
self.demo.launch()
|
|
|
|
|
|
|
|
|
|
|
194 |
# Create and expose the demo instance
|
195 |
def demo():
|
196 |
chat = GeminiVoiceChat()
|