Spaces:
Restarting on CPU Upgrade

akhaliq HF staff commited on
Commit
cef6785
·
1 Parent(s): 6d97eff

working version gemini voice

Browse files
Files changed (3) hide show
  1. app.py +1 -1
  2. app_gemini_voice.py +5 -6
  3. pre-requirements.txt +2 -0
app.py CHANGED
@@ -31,7 +31,7 @@ from app_gemini_voice import demo as demo_gemini_voice
31
 
32
  # Create mapping of providers to their demos
33
  PROVIDERS = {
34
- "Gemini Voice": demo_gemini_voice(),
35
  "Gemini": demo_gemini,
36
  "Grok": demo_grok,
37
  "Cohere": demo_cohere,
 
31
 
32
  # Create mapping of providers to their demos
33
  PROVIDERS = {
34
+ "Gemini Voice": demo_gemini_voice,
35
  "Gemini": demo_gemini,
36
  "Grok": demo_grok,
37
  "Cohere": demo_cohere,
app_gemini_voice.py CHANGED
@@ -199,11 +199,10 @@ class GeminiVoiceChat:
199
  ssl_certfile=None
200
  )
201
 
 
202
  def demo():
203
- voice_chat = GeminiVoiceChat()
204
- return voice_chat.demo
205
 
206
- # This allows both direct running and importing
207
- if __name__ == "__main__":
208
- app = GeminiVoiceChat()
209
- app.launch()
 
199
  ssl_certfile=None
200
  )
201
 
202
+ # Create and expose the demo instance
203
  def demo():
204
+ chat = GeminiVoiceChat()
205
+ return chat.demo
206
 
207
+ # This is what will be imported by app.py
208
+ demo = demo()
 
 
pre-requirements.txt CHANGED
@@ -2,4 +2,6 @@ gradio_webrtc==0.0.23
2
  librosa
3
  python-dotenv
4
  twilio
 
 
5
  git+https://github.com/AK391/transformers-gradio.git
 
2
  librosa
3
  python-dotenv
4
  twilio
5
+ websockets>=11.0.0
6
+ numpy
7
  git+https://github.com/AK391/transformers-gradio.git