Spaces:
Sleeping
Sleeping
update app
Browse files
app.py
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
from smolagents import CodeAgent,DuckDuckGoSearchTool, HfApiModel,load_tool,tool
|
| 2 |
import datetime
|
| 3 |
import requests
|
| 4 |
import pytz
|
|
@@ -117,15 +117,20 @@ final_answer = FinalAnswerTool()
|
|
| 117 |
# 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:
|
| 118 |
# model_id='https://pflgm2locj2t89co.us-east-1.aws.endpoints.huggingface.cloud'
|
| 119 |
|
| 120 |
-
model = HfApiModel(
|
| 121 |
-
|
| 122 |
-
|
|
|
|
| 123 |
#model_id='Qwen/Qwen2.5-Coder-32B-Instruct',# it is possible that this model may be overloaded
|
| 124 |
-
model_id='google/gemma-3-1b-it',
|
| 125 |
-
custom_role_conversions=None,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 126 |
)
|
| 127 |
|
| 128 |
-
|
| 129 |
# Import tool from Hub
|
| 130 |
image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_code=True)
|
| 131 |
|
|
|
|
| 1 |
+
from smolagents import CodeAgent,DuckDuckGoSearchTool, HfApiModel,load_tool,tool, LifeLLMModel
|
| 2 |
import datetime
|
| 3 |
import requests
|
| 4 |
import pytz
|
|
|
|
| 117 |
# 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:
|
| 118 |
# model_id='https://pflgm2locj2t89co.us-east-1.aws.endpoints.huggingface.cloud'
|
| 119 |
|
| 120 |
+
#model = HfApiModel(
|
| 121 |
+
|
| 122 |
+
#max_tokens=2096,
|
| 123 |
+
#temperature=0.5,
|
| 124 |
#model_id='Qwen/Qwen2.5-Coder-32B-Instruct',# it is possible that this model may be overloaded
|
| 125 |
+
#model_id='google/gemma-3-1b-it',
|
| 126 |
+
#custom_role_conversions=None,
|
| 127 |
+
#)
|
| 128 |
+
model=LiteLLMModel(
|
| 129 |
+
model_id = 'ollama_chat/qwen3:8b",
|
| 130 |
+
api_base="http://127.0.0.1:11434/",
|
| 131 |
+
num_ctx=8192,
|
| 132 |
)
|
| 133 |
|
|
|
|
| 134 |
# Import tool from Hub
|
| 135 |
image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_code=True)
|
| 136 |
|