Spaces:
Running on CPU Upgrade

hysts HF staff commited on
Commit
5568b1a
·
1 Parent(s): 8c42f72
Files changed (3) hide show
  1. app_gemini.py +5 -8
  2. app_gemini_coder.py +5 -8
  3. app_gemini_voice.py +5 -8
app_gemini.py CHANGED
@@ -1,17 +1,12 @@
1
  import ai_gradio
 
2
  from utils_ai_gradio import get_app
3
 
4
  # Get the Gemini models but keep their full names for loading
5
- GEMINI_MODELS_FULL = [
6
- k for k in ai_gradio.registry.keys()
7
- if k.startswith('gemini:')
8
- ]
9
 
10
  # Create display names without the prefix
11
- GEMINI_MODELS_DISPLAY = [
12
- k.replace('gemini:', '')
13
- for k in GEMINI_MODELS_FULL
14
- ]
15
 
16
  # Create and launch the interface using get_app utility
17
  demo = get_app(
@@ -23,3 +18,5 @@ demo = get_app(
23
  fill_height=True,
24
  )
25
 
 
 
 
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(
 
18
  fill_height=True,
19
  )
20
 
21
+ if __name__ == "__main__":
22
+ demo.launch()
app_gemini_coder.py CHANGED
@@ -1,17 +1,12 @@
1
  import ai_gradio
 
2
  from utils_ai_gradio import get_app
3
 
4
  # Get the Gemini models but keep their full names for loading
5
- GEMINI_MODELS_FULL = [
6
- k for k in ai_gradio.registry.keys()
7
- if k.startswith('gemini:')
8
- ]
9
 
10
  # Create display names without the prefix
11
- GEMINI_MODELS_DISPLAY = [
12
- k.replace('gemini:', '')
13
- for k in GEMINI_MODELS_FULL
14
- ]
15
 
16
  # Create and launch the interface using get_app utility
17
  demo = get_app(
@@ -24,3 +19,5 @@ demo = get_app(
24
  coder=True,
25
  )
26
 
 
 
 
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(
 
19
  coder=True,
20
  )
21
 
22
+ if __name__ == "__main__":
23
+ demo.launch()
app_gemini_voice.py CHANGED
@@ -1,17 +1,12 @@
1
  import ai_gradio
 
2
  from utils_ai_gradio import get_app
3
 
4
  # Get the Gemini models but keep their full names for loading
5
- GEMINI_MODELS_FULL = [
6
- k for k in ai_gradio.registry.keys()
7
- if k.startswith('gemini:')
8
- ]
9
 
10
  # Create display names without the prefix
11
- GEMINI_MODELS_DISPLAY = [
12
- k.replace('gemini:', '')
13
- for k in GEMINI_MODELS_FULL
14
- ]
15
 
16
  # Create and launch the interface using get_app utility
17
  demo = get_app(
@@ -24,3 +19,5 @@ demo = get_app(
24
  fill_height=True,
25
  )
26
 
 
 
 
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(
 
19
  fill_height=True,
20
  )
21
 
22
+ if __name__ == "__main__":
23
+ demo.launch()