Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
add smolagents example
Browse files- app.py +2 -0
- app_smolagents.py +24 -0
- requirements.txt +1 -1
app.py
CHANGED
@@ -29,12 +29,14 @@ from app_gemini_coder import demo as demo_gemini_coder
|
|
29 |
from app_gemini import demo as demo_gemini
|
30 |
from app_gemini_voice import demo as demo_gemini_voice
|
31 |
from app_hyperbolic_coder import demo as demo_hyperbolic_coder
|
|
|
32 |
from utils import get_app
|
33 |
|
34 |
# Create mapping of providers to their demos
|
35 |
PROVIDERS = {
|
36 |
"Gemini Coder": demo_gemini_coder,
|
37 |
"Hyperbolic Coder": demo_hyperbolic_coder,
|
|
|
38 |
"DeepSeek": demo_deepseek,
|
39 |
"OpenAI": demo_openai,
|
40 |
"Compare": demo_compare,
|
|
|
29 |
from app_gemini import demo as demo_gemini
|
30 |
from app_gemini_voice import demo as demo_gemini_voice
|
31 |
from app_hyperbolic_coder import demo as demo_hyperbolic_coder
|
32 |
+
from app_smolagents import demo as demo_smolagents
|
33 |
from utils import get_app
|
34 |
|
35 |
# Create mapping of providers to their demos
|
36 |
PROVIDERS = {
|
37 |
"Gemini Coder": demo_gemini_coder,
|
38 |
"Hyperbolic Coder": demo_hyperbolic_coder,
|
39 |
+
"SmolAgents": demo_smolagents,
|
40 |
"DeepSeek": demo_deepseek,
|
41 |
"OpenAI": demo_openai,
|
42 |
"Compare": demo_compare,
|
app_smolagents.py
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import ai_gradio
|
2 |
+
from utils_ai_gradio import get_app
|
3 |
+
|
4 |
+
SMOLAGENTS_MODELS_FULL = [
|
5 |
+
k for k in ai_gradio.registry.keys()
|
6 |
+
if k.startswith('smolagents:')
|
7 |
+
]
|
8 |
+
|
9 |
+
|
10 |
+
SMOLAGENTS_MODELS_DISPLAY = [
|
11 |
+
k.replace('smolagents:', '')
|
12 |
+
for k in SMOLAGENTS_MODELS_FULL
|
13 |
+
]
|
14 |
+
|
15 |
+
demo = get_app(
|
16 |
+
models=SMOLAGENTS_MODELS_FULL, # Use the full names with prefix
|
17 |
+
default_model=SMOLAGENTS_MODELS_FULL[-1],
|
18 |
+
dropdown_label="Select SmolAgents Model",
|
19 |
+
choices=SMOLAGENTS_MODELS_DISPLAY, # Display names without prefix
|
20 |
+
fill_height=True,
|
21 |
+
)
|
22 |
+
|
23 |
+
if __name__ == "__main__":
|
24 |
+
demo.launch()
|
requirements.txt
CHANGED
@@ -513,7 +513,7 @@ xai-gradio==0.0.2
|
|
513 |
# via anychat (pyproject.toml)
|
514 |
yarl==1.18.3
|
515 |
# via aiohttp
|
516 |
-
ai-gradio[deepseek,crewai,hyperbolic,openai,gemini]==0.2.
|
517 |
crewai==0.86.0
|
518 |
instructor==1.3.3
|
519 |
crewai-tools>=0.17.0
|
|
|
513 |
# via anychat (pyproject.toml)
|
514 |
yarl==1.18.3
|
515 |
# via aiohttp
|
516 |
+
ai-gradio[deepseek,crewai,hyperbolic,openai,gemini,smolagents]==0.2.1
|
517 |
crewai==0.86.0
|
518 |
instructor==1.3.3
|
519 |
crewai-tools>=0.17.0
|