akhaliq HF staff commited on
Commit
aba2576
1 Parent(s): 97e0f7f

add openai voice

Browse files
Files changed (3) hide show
  1. app.py +3 -1
  2. app_openai_voice.py +21 -0
  3. requirements.txt +1 -1
app.py CHANGED
@@ -24,10 +24,12 @@ from app_sambanova import demo as demo_sambanova
24
  from app_showui import demo as demo_showui
25
  from app_together import demo as demo_together
26
  from app_xai import demo as demo_grok
 
27
  from utils import get_app
28
 
29
  # Create mapping of providers to their demos
30
  PROVIDERS = {
 
31
  "Gemini Voice": demo_gemini_voice,
32
  "Gemini": demo_gemini,
33
  "LumaAI": demo_lumaai,
@@ -56,7 +58,7 @@ PROVIDERS = {
56
  "NVIDIA": demo_nvidia,
57
  }
58
 
59
- demo = get_app(models=list(PROVIDERS.keys()), default_model="Gemini Voice", src=PROVIDERS, dropdown_label="Select Provider")
60
 
61
  if __name__ == "__main__":
62
  demo.queue(api_open=False).launch(show_api=False)
 
24
  from app_showui import demo as demo_showui
25
  from app_together import demo as demo_together
26
  from app_xai import demo as demo_grok
27
+ from app_openai_voice import demo as demo_openai_voice
28
  from utils import get_app
29
 
30
  # Create mapping of providers to their demos
31
  PROVIDERS = {
32
+ "OpenAI Voice": demo_openai_voice,
33
  "Gemini Voice": demo_gemini_voice,
34
  "Gemini": demo_gemini,
35
  "LumaAI": demo_lumaai,
 
58
  "NVIDIA": demo_nvidia,
59
  }
60
 
61
+ demo = get_app(models=list(PROVIDERS.keys()), default_model="OpenAI Voice", src=PROVIDERS, dropdown_label="Select Provider")
62
 
63
  if __name__ == "__main__":
64
  demo.queue(api_open=False).launch(show_api=False)
app_openai_voice.py ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+
3
+ import openai_gradio
4
+
5
+ from utils import get_app
6
+
7
+ demo = get_app(
8
+ models=[
9
+ "gpt-4o-realtime-preview",
10
+ "gpt-4o-realtime-preview-2024-12-17",
11
+ "gpt-4o-realtime-preview-2024-10-01",
12
+ "gpt-4o-mini-realtime-preview",
13
+ "gpt-4o-mini-realtime-preview-2024-12-17",
14
+ ],
15
+ default_model="gpt-4o-mini-realtime-preview-2024-12-17",
16
+ src=openai_gradio,
17
+ accept_token=not os.getenv("OPENAI_API_KEY"),
18
+ )
19
+
20
+ if __name__ == "__main__":
21
+ demo.launch()
requirements.txt CHANGED
@@ -300,7 +300,7 @@ openai==1.55.0
300
  # sambanova-gradio
301
  # together-gradio
302
  # xai-gradio
303
- openai-gradio==0.0.4
304
  # via anychat (pyproject.toml)
305
  orjson==3.10.11
306
  # via gradio
 
300
  # sambanova-gradio
301
  # together-gradio
302
  # xai-gradio
303
+ openai-gradio==0.0.5
304
  # via anychat (pyproject.toml)
305
  orjson==3.10.11
306
  # via gradio