Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
back to gemini
Browse files
app.py
CHANGED
@@ -24,12 +24,10 @@ from app_showui import demo as demo_showui
|
|
24 |
from app_together import demo as demo_together
|
25 |
from app_xai import demo as demo_grok
|
26 |
from app_openai_voice import demo as demo_openai_voice
|
27 |
-
from app_qwen import demo as demo_qwen
|
28 |
from utils import get_app
|
29 |
|
30 |
# Create mapping of providers to their demos
|
31 |
PROVIDERS = {
|
32 |
-
"Qwen": demo_qwen,
|
33 |
"Gemini": demo_gemini,
|
34 |
"OpenAI Voice": demo_openai_voice,
|
35 |
"Gemini Voice": demo_gemini_voice,
|
@@ -58,7 +56,7 @@ PROVIDERS = {
|
|
58 |
"NVIDIA": demo_nvidia,
|
59 |
}
|
60 |
|
61 |
-
demo = get_app(models=list(PROVIDERS.keys()), default_model="
|
62 |
|
63 |
if __name__ == "__main__":
|
64 |
demo.queue(api_open=False).launch(show_api=False)
|
|
|
24 |
from app_together import demo as demo_together
|
25 |
from app_xai import demo as demo_grok
|
26 |
from app_openai_voice import demo as demo_openai_voice
|
|
|
27 |
from utils import get_app
|
28 |
|
29 |
# Create mapping of providers to their demos
|
30 |
PROVIDERS = {
|
|
|
31 |
"Gemini": demo_gemini,
|
32 |
"OpenAI Voice": demo_openai_voice,
|
33 |
"Gemini Voice": demo_gemini_voice,
|
|
|
56 |
"NVIDIA": demo_nvidia,
|
57 |
}
|
58 |
|
59 |
+
demo = get_app(models=list(PROVIDERS.keys()), default_model="Gemini", src=PROVIDERS, dropdown_label="Select Provider")
|
60 |
|
61 |
if __name__ == "__main__":
|
62 |
demo.queue(api_open=False).launch(show_api=False)
|
utils.py
CHANGED
@@ -21,16 +21,7 @@ def get_app(
|
|
21 |
for model_name in models:
|
22 |
with gr.Column(visible=model_name == default_model) as column:
|
23 |
if isinstance(src, dict):
|
24 |
-
|
25 |
-
provider, model = model_name.split(':')
|
26 |
-
if f"{provider}:{model}" in src:
|
27 |
-
src[f"{provider}:{model}"](name=model_name, **kwargs)
|
28 |
-
else:
|
29 |
-
raise ValueError(f"Model {model_name} not found in registry. Available models: {list(src.keys())}")
|
30 |
-
else:
|
31 |
-
# Default provider handling if needed
|
32 |
-
src[model_name].render()
|
33 |
-
|
34 |
else:
|
35 |
gr.load(name=model_name, src=src, accept_token=accept_token, **kwargs)
|
36 |
columns.append(column)
|
|
|
21 |
for model_name in models:
|
22 |
with gr.Column(visible=model_name == default_model) as column:
|
23 |
if isinstance(src, dict):
|
24 |
+
src[model_name].render()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
else:
|
26 |
gr.load(name=model_name, src=src, accept_token=accept_token, **kwargs)
|
27 |
columns.append(column)
|