Spaces:
Running
Running
Clint Adams
commited on
Commit
·
c1b7205
1
Parent(s):
7ae8483
try groq/openrouter.ai endpoints
Browse files- app.py +8 -7
- requirements.txt +1 -1
app.py
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
from smolagents import CodeAgent,DuckDuckGoSearchTool, HfApiModel,load_tool,tool
|
2 |
from pydantic import BaseModel
|
3 |
import datetime
|
4 |
import requests
|
@@ -86,14 +86,15 @@ final_answer = FinalAnswerTool()
|
|
86 |
# If the agent does not answer, the model is overloaded, please use another model or the following Hugging Face Endpoint that also contains qwen2.5 coder:
|
87 |
# model_id='https://pflgm2locj2t89co.us-east-1.aws.endpoints.huggingface.cloud'
|
88 |
|
89 |
-
model = HfApiModel(
|
90 |
-
max_tokens=2096,
|
91 |
-
temperature=0.5,
|
92 |
#model_id='Qwen/Qwen2.5-Coder-32B-Instruct',# it is possible that this model may be overloaded
|
93 |
-
|
94 |
-
|
95 |
-
)
|
96 |
|
|
|
|
|
97 |
|
98 |
# Import tool from Hub
|
99 |
#image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_code=True)
|
|
|
1 |
+
from smolagents import CodeAgent,DuckDuckGoSearchTool, HfApiModel, LiteLLMModel, load_tool,tool
|
2 |
from pydantic import BaseModel
|
3 |
import datetime
|
4 |
import requests
|
|
|
86 |
# If the agent does not answer, the model is overloaded, please use another model or the following Hugging Face Endpoint that also contains qwen2.5 coder:
|
87 |
# model_id='https://pflgm2locj2t89co.us-east-1.aws.endpoints.huggingface.cloud'
|
88 |
|
89 |
+
#model = HfApiModel(
|
90 |
+
#max_tokens=2096,
|
91 |
+
#temperature=0.5,
|
92 |
#model_id='Qwen/Qwen2.5-Coder-32B-Instruct',# it is possible that this model may be overloaded
|
93 |
+
#custom_role_conversions=None,
|
94 |
+
#)
|
|
|
95 |
|
96 |
+
#model = LiteLLMModel("groq/qwen-2.5-coder-32b", temperature=0.5)
|
97 |
+
model = LiteLLMModel("openrouter/qwen/qwen2.5-vl-32b-instruct:free", temperature=0.5)
|
98 |
|
99 |
# Import tool from Hub
|
100 |
#image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_code=True)
|
requirements.txt
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
markdownify
|
2 |
-
smolagents
|
3 |
requests
|
4 |
duckduckgo_search
|
5 |
pandas
|
|
|
1 |
markdownify
|
2 |
+
smolagents[litellm]
|
3 |
requests
|
4 |
duckduckgo_search
|
5 |
pandas
|