Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
add nvidia coder
Browse files- app.py +3 -1
- app_nvidia_coder.py +23 -0
- pyproject.toml +1 -1
- requirements.txt +1 -1
app.py
CHANGED
@@ -27,10 +27,12 @@ from app_nvidia import demo as demo_nvidia
|
|
27 |
from app_deepseek import demo as demo_deepseek
|
28 |
from app_qwen import demo as demo_qwen
|
29 |
from app_qwen_coder import demo as demo_qwen_coder
|
|
|
30 |
from utils import get_app
|
31 |
|
32 |
# Create mapping of providers to their demos
|
33 |
PROVIDERS = {
|
|
|
34 |
"Hyperbolic Coder": demo_hyperbolic_coder,
|
35 |
"Hyperbolic": demo_hyperbolic,
|
36 |
"Groq Coder": demo_groq_coder,
|
@@ -64,7 +66,7 @@ PROVIDERS = {
|
|
64 |
|
65 |
demo = get_app(
|
66 |
models=list(PROVIDERS.keys()),
|
67 |
-
default_model="
|
68 |
src=PROVIDERS,
|
69 |
dropdown_label="Select Provider",
|
70 |
)
|
|
|
27 |
from app_deepseek import demo as demo_deepseek
|
28 |
from app_qwen import demo as demo_qwen
|
29 |
from app_qwen_coder import demo as demo_qwen_coder
|
30 |
+
from app_nvidia_coder import demo as demo_nvidia_coder
|
31 |
from utils import get_app
|
32 |
|
33 |
# Create mapping of providers to their demos
|
34 |
PROVIDERS = {
|
35 |
+
"NVIDIA Coder": demo_nvidia_coder,
|
36 |
"Hyperbolic Coder": demo_hyperbolic_coder,
|
37 |
"Hyperbolic": demo_hyperbolic,
|
38 |
"Groq Coder": demo_groq_coder,
|
|
|
66 |
|
67 |
demo = get_app(
|
68 |
models=list(PROVIDERS.keys()),
|
69 |
+
default_model="NVIDIA Coder",
|
70 |
src=PROVIDERS,
|
71 |
dropdown_label="Select Provider",
|
72 |
)
|
app_nvidia_coder.py
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import ai_gradio
|
2 |
+
|
3 |
+
from utils_ai_gradio import get_app
|
4 |
+
|
5 |
+
# Get the nvidia models but keep their full names for loading
|
6 |
+
NVIDIA_MODELS_FULL = [k for k in ai_gradio.registry.keys() if k.startswith("nvidia:")]
|
7 |
+
|
8 |
+
# Create display names without the prefix
|
9 |
+
NVIDIA_MODELS_DISPLAY = [k.replace("nvidia:", "") for k in NVIDIA_MODELS_FULL]
|
10 |
+
|
11 |
+
|
12 |
+
# Create and launch the interface using get_app utility
|
13 |
+
demo = get_app(
|
14 |
+
models=NVIDIA_MODELS_FULL, # Use the full names with prefix
|
15 |
+
default_model=NVIDIA_MODELS_FULL[-1],
|
16 |
+
dropdown_label="Select Nvidia Model",
|
17 |
+
choices=NVIDIA_MODELS_DISPLAY, # Display names without prefix
|
18 |
+
fill_height=True,
|
19 |
+
coder=True
|
20 |
+
)
|
21 |
+
|
22 |
+
if __name__ == "__main__":
|
23 |
+
demo.launch()
|
pyproject.toml
CHANGED
@@ -38,7 +38,7 @@ dependencies = [
|
|
38 |
"langchain>=0.3.14",
|
39 |
"chromadb>=0.5.23",
|
40 |
"openai>=1.55.0",
|
41 |
-
"ai-gradio[crewai,deepseek,gemini,groq,hyperbolic,openai,smolagents,transformers, langchain, mistral,minimax,nvidia, qwen]>=0.2.
|
42 |
]
|
43 |
|
44 |
[tool.uv.sources]
|
|
|
38 |
"langchain>=0.3.14",
|
39 |
"chromadb>=0.5.23",
|
40 |
"openai>=1.55.0",
|
41 |
+
"ai-gradio[crewai,deepseek,gemini,groq,hyperbolic,openai,smolagents,transformers, langchain, mistral,minimax,nvidia, qwen]>=0.2.34",
|
42 |
]
|
43 |
|
44 |
[tool.uv.sources]
|
requirements.txt
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
# uv pip compile pyproject.toml -o requirements.txt
|
3 |
accelerate==1.2.1
|
4 |
# via ai-gradio
|
5 |
-
ai-gradio==0.2.
|
6 |
# via anychat (pyproject.toml)
|
7 |
aiofiles==23.2.1
|
8 |
# via gradio
|
|
|
2 |
# uv pip compile pyproject.toml -o requirements.txt
|
3 |
accelerate==1.2.1
|
4 |
# via ai-gradio
|
5 |
+
ai-gradio==0.2.34
|
6 |
# via anychat (pyproject.toml)
|
7 |
aiofiles==23.2.1
|
8 |
# via gradio
|