Spaces:
Running on CPU Upgrade

akhaliq HF staff commited on
Commit
4b3b3b3
·
1 Parent(s): 723d7fe

add moondream

Browse files
Files changed (2) hide show
  1. app.py +3 -1
  2. app_moondream.py +13 -0
app.py CHANGED
@@ -33,10 +33,12 @@ from app_groq import demo as demo_groq
33
  from app_groq_coder import demo as demo_groq_coder
34
  from app_openai_coder import demo as demo_openai_coder
35
  from app_transformers import demo as demo_transformers
 
36
  from utils import get_app
37
 
38
  # Create mapping of providers to their demos
39
  PROVIDERS = {
 
40
  "Phi-4": demo_transformers,
41
  "OpenAI Coder": demo_openai_coder,
42
  "Gemini Coder": demo_gemini_coder,
@@ -74,7 +76,7 @@ PROVIDERS = {
74
  "NVIDIA": demo_nvidia,
75
  }
76
 
77
- demo = get_app(models=list(PROVIDERS.keys()), default_model="Phi-4", src=PROVIDERS, dropdown_label="Select Provider")
78
 
79
  if __name__ == "__main__":
80
  demo.queue(api_open=False).launch(show_api=False)
 
33
  from app_groq_coder import demo as demo_groq_coder
34
  from app_openai_coder import demo as demo_openai_coder
35
  from app_transformers import demo as demo_transformers
36
+ from app_moondream import demo as demo_moondream
37
  from utils import get_app
38
 
39
  # Create mapping of providers to their demos
40
  PROVIDERS = {
41
+ "MoonDream": demo_moondream,
42
  "Phi-4": demo_transformers,
43
  "OpenAI Coder": demo_openai_coder,
44
  "Gemini Coder": demo_gemini_coder,
 
76
  "NVIDIA": demo_nvidia,
77
  }
78
 
79
+ demo = get_app(models=list(PROVIDERS.keys()), default_model="MoonDream 2B", src=PROVIDERS, dropdown_label="Select Provider")
80
 
81
  if __name__ == "__main__":
82
  demo.queue(api_open=False).launch(show_api=False)
app_moondream.py ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+
3
+ # Load the Gradio space
4
+ demo = gr.load(name="akhaliq/moondream", src="spaces")
5
+
6
+
7
+ # Disable API access for all functions
8
+ if hasattr(demo, "fns"):
9
+ for fn in demo.fns.values():
10
+ fn.api_name = False
11
+
12
+ if __name__ == "__main__":
13
+ demo.launch()