Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Re-add app_gemini_camera.py
Browse files- app.py +6 -1
- app_gemini_camera.py +23 -0
app.py
CHANGED
@@ -8,6 +8,7 @@ from app_experimental import demo as demo_experimental
|
|
8 |
from app_fal import demo as demo_fal
|
9 |
from app_fireworks import demo as demo_fireworks
|
10 |
from app_gemini import demo as demo_gemini
|
|
|
11 |
from app_gemini_coder import demo as demo_gemini_coder
|
12 |
from app_gemini_voice import demo as demo_gemini_voice
|
13 |
from app_groq import demo as demo_groq
|
@@ -36,6 +37,7 @@ from utils import get_app
|
|
36 |
|
37 |
# Create mapping of providers to their demos
|
38 |
PROVIDERS = {
|
|
|
39 |
"Gemini Coder": demo_gemini_coder,
|
40 |
"OpenAI Coder": demo_openai_coder,
|
41 |
"OpenAI": demo_openai,
|
@@ -73,7 +75,10 @@ PROVIDERS = {
|
|
73 |
}
|
74 |
|
75 |
demo = get_app(
|
76 |
-
models=list(PROVIDERS.keys()),
|
|
|
|
|
|
|
77 |
)
|
78 |
|
79 |
if __name__ == "__main__":
|
|
|
8 |
from app_fal import demo as demo_fal
|
9 |
from app_fireworks import demo as demo_fireworks
|
10 |
from app_gemini import demo as demo_gemini
|
11 |
+
from app_gemini_camera import demo as demo_gemini_camera
|
12 |
from app_gemini_coder import demo as demo_gemini_coder
|
13 |
from app_gemini_voice import demo as demo_gemini_voice
|
14 |
from app_groq import demo as demo_groq
|
|
|
37 |
|
38 |
# Create mapping of providers to their demos
|
39 |
PROVIDERS = {
|
40 |
+
"Gemini Camera": demo_gemini_camera,
|
41 |
"Gemini Coder": demo_gemini_coder,
|
42 |
"OpenAI Coder": demo_openai_coder,
|
43 |
"OpenAI": demo_openai,
|
|
|
75 |
}
|
76 |
|
77 |
demo = get_app(
|
78 |
+
models=list(PROVIDERS.keys()),
|
79 |
+
default_model="Gemini Camera",
|
80 |
+
src=PROVIDERS,
|
81 |
+
dropdown_label="Select Provider",
|
82 |
)
|
83 |
|
84 |
if __name__ == "__main__":
|
app_gemini_camera.py
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import ai_gradio
|
2 |
+
|
3 |
+
from utils_ai_gradio import get_app
|
4 |
+
|
5 |
+
# Get the Gemini models but keep their full names for loading
|
6 |
+
GEMINI_MODELS_FULL = [k for k in ai_gradio.registry if k.startswith("gemini:")]
|
7 |
+
|
8 |
+
# Create display names without the prefix
|
9 |
+
GEMINI_MODELS_DISPLAY = [k.replace("gemini:", "") for k in GEMINI_MODELS_FULL]
|
10 |
+
|
11 |
+
# Create and launch the interface using get_app utility
|
12 |
+
demo = get_app(
|
13 |
+
models=GEMINI_MODELS_FULL, # Use the full names with prefix
|
14 |
+
default_model=GEMINI_MODELS_FULL[-2],
|
15 |
+
dropdown_label="Select Gemini Model",
|
16 |
+
choices=GEMINI_MODELS_DISPLAY, # Display names without prefix
|
17 |
+
src=ai_gradio.registry,
|
18 |
+
camera=True,
|
19 |
+
fill_height=True,
|
20 |
+
)
|
21 |
+
|
22 |
+
if __name__ == "__main__":
|
23 |
+
demo.launch()
|