Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
fix openai voice and chat for model dropdown and use one provider dropdown
Browse files- app.py +2 -4
- app_hyperbolic.py +1 -1
- app_openai.py +19 -27
- requirements.txt +1 -1
- utils_hyperbolic.py → utils_ai_gradio.py +0 -0
app.py
CHANGED
@@ -13,7 +13,6 @@ from app_meta import demo as demo_meta
|
|
13 |
from app_mistral import demo as demo_mistral
|
14 |
from app_nvidia import demo as demo_nvidia
|
15 |
from app_omini import demo as demo_omini
|
16 |
-
from app_openai import demo as demo_openai
|
17 |
from app_paligemma import demo as demo_paligemma
|
18 |
from app_perplexity import demo as demo_perplexity
|
19 |
from app_playai import demo as demo_playai
|
@@ -22,26 +21,25 @@ from app_sambanova import demo as demo_sambanova
|
|
22 |
from app_showui import demo as demo_showui
|
23 |
from app_together import demo as demo_together
|
24 |
from app_xai import demo as demo_grok
|
25 |
-
from app_openai_voice import demo as demo_openai_voice
|
26 |
from app_qwen import demo as demo_qwen
|
27 |
from app_deepseek import demo as demo_deepseek
|
28 |
from app_crew import demo as demo_crew
|
29 |
from app_compare import demo as demo_compare
|
30 |
from app_hyperbolic import demo as demo_hyperbolic
|
|
|
31 |
from utils import get_app
|
32 |
|
33 |
# Create mapping of providers to their demos
|
34 |
PROVIDERS = {
|
35 |
"DeepSeek": demo_deepseek,
|
|
|
36 |
"Compare": demo_compare,
|
37 |
"Qwen" : demo_qwen,
|
38 |
"Gemini": demo_gemini,
|
39 |
-
"OpenAI Voice": demo_openai_voice,
|
40 |
"Gemini Voice": demo_gemini_voice,
|
41 |
"Hyperbolic": demo_hyperbolic,
|
42 |
"CrewAI": demo_crew,
|
43 |
"LumaAI": demo_lumaai,
|
44 |
-
"ChatGPT": demo_openai,
|
45 |
"Grok": demo_grok,
|
46 |
"Cohere": demo_cohere,
|
47 |
"SambaNova": demo_sambanova,
|
|
|
13 |
from app_mistral import demo as demo_mistral
|
14 |
from app_nvidia import demo as demo_nvidia
|
15 |
from app_omini import demo as demo_omini
|
|
|
16 |
from app_paligemma import demo as demo_paligemma
|
17 |
from app_perplexity import demo as demo_perplexity
|
18 |
from app_playai import demo as demo_playai
|
|
|
21 |
from app_showui import demo as demo_showui
|
22 |
from app_together import demo as demo_together
|
23 |
from app_xai import demo as demo_grok
|
|
|
24 |
from app_qwen import demo as demo_qwen
|
25 |
from app_deepseek import demo as demo_deepseek
|
26 |
from app_crew import demo as demo_crew
|
27 |
from app_compare import demo as demo_compare
|
28 |
from app_hyperbolic import demo as demo_hyperbolic
|
29 |
+
from app_openai import demo as demo_openai
|
30 |
from utils import get_app
|
31 |
|
32 |
# Create mapping of providers to their demos
|
33 |
PROVIDERS = {
|
34 |
"DeepSeek": demo_deepseek,
|
35 |
+
"OpenAI": demo_openai,
|
36 |
"Compare": demo_compare,
|
37 |
"Qwen" : demo_qwen,
|
38 |
"Gemini": demo_gemini,
|
|
|
39 |
"Gemini Voice": demo_gemini_voice,
|
40 |
"Hyperbolic": demo_hyperbolic,
|
41 |
"CrewAI": demo_crew,
|
42 |
"LumaAI": demo_lumaai,
|
|
|
43 |
"Grok": demo_grok,
|
44 |
"Cohere": demo_cohere,
|
45 |
"SambaNova": demo_sambanova,
|
app_hyperbolic.py
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
import ai_gradio
|
2 |
-
from
|
3 |
|
4 |
# Get the hyperbolic models but keep their full names for loading
|
5 |
HYPERBOLIC_MODELS_FULL = [
|
|
|
1 |
import ai_gradio
|
2 |
+
from utils_ai_gradio import get_app
|
3 |
|
4 |
# Get the hyperbolic models but keep their full names for loading
|
5 |
HYPERBOLIC_MODELS_FULL = [
|
app_openai.py
CHANGED
@@ -1,34 +1,26 @@
|
|
1 |
-
import
|
|
|
2 |
|
3 |
-
import openai_gradio
|
4 |
|
5 |
-
|
|
|
|
|
|
|
|
|
6 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
demo = get_app(
|
8 |
-
models=
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
"chatgpt-4o-latest",
|
14 |
-
"gpt-4o-mini",
|
15 |
-
"gpt-4o-mini-2024-07-18",
|
16 |
-
"o1-preview",
|
17 |
-
"o1-preview-2024-09-12",
|
18 |
-
"o1-mini",
|
19 |
-
"o1-mini-2024-09-12",
|
20 |
-
"gpt-4-turbo",
|
21 |
-
"gpt-4-turbo-2024-04-09",
|
22 |
-
"gpt-4-turbo-preview",
|
23 |
-
"gpt-4-0125-preview",
|
24 |
-
"gpt-4-1106-preview",
|
25 |
-
"gpt-4",
|
26 |
-
"gpt-4-0613",
|
27 |
-
"o1-2024-12-17",
|
28 |
-
],
|
29 |
-
default_model="gpt-4o-mini",
|
30 |
-
src=openai_gradio.registry,
|
31 |
-
accept_token=not os.getenv("OPENAI_API_KEY"),
|
32 |
)
|
33 |
|
34 |
if __name__ == "__main__":
|
|
|
1 |
+
import ai_gradio
|
2 |
+
from utils_ai_gradio import get_app
|
3 |
|
|
|
4 |
|
5 |
+
# Get the OpenAI models but keep their full names for loading
|
6 |
+
OPENAI_MODELS_FULL = [
|
7 |
+
k for k in ai_gradio.registry.keys()
|
8 |
+
if k.startswith('openai:')
|
9 |
+
]
|
10 |
|
11 |
+
# Create display names without the prefix
|
12 |
+
OPENAI_MODELS_DISPLAY = [
|
13 |
+
k.replace('openai:', '')
|
14 |
+
for k in OPENAI_MODELS_FULL
|
15 |
+
]
|
16 |
+
|
17 |
+
# Create and launch the interface using get_app utility
|
18 |
demo = get_app(
|
19 |
+
models=OPENAI_MODELS_FULL, # Use the full names with prefix
|
20 |
+
default_model=OPENAI_MODELS_FULL[-1],
|
21 |
+
dropdown_label="Select OpenAI Model",
|
22 |
+
choices=OPENAI_MODELS_DISPLAY, # Display names without prefix
|
23 |
+
fill_height=True,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
)
|
25 |
|
26 |
if __name__ == "__main__":
|
requirements.txt
CHANGED
@@ -513,7 +513,7 @@ xai-gradio==0.0.2
|
|
513 |
# via anychat (pyproject.toml)
|
514 |
yarl==1.18.3
|
515 |
# via aiohttp
|
516 |
-
ai-gradio[deepseek,crewai,hyperbolic]==0.1.
|
517 |
crewai==0.86.0
|
518 |
instructor==1.3.3
|
519 |
crewai-tools>=0.17.0
|
|
|
513 |
# via anychat (pyproject.toml)
|
514 |
yarl==1.18.3
|
515 |
# via aiohttp
|
516 |
+
ai-gradio[deepseek,crewai,hyperbolic,openai]==0.1.8
|
517 |
crewai==0.86.0
|
518 |
instructor==1.3.3
|
519 |
crewai-tools>=0.17.0
|
utils_hyperbolic.py → utils_ai_gradio.py
RENAMED
File without changes
|