Update app.py
Browse files
app.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
-
|
| 2 |
|
| 3 |
-
from smolagents import CodeAgent,DuckDuckGoSearchTool, InferenceClientModel, load_tool,tool
|
| 4 |
|
| 5 |
|
| 6 |
|
|
@@ -44,22 +44,22 @@ final_answer = FinalAnswerTool()
|
|
| 44 |
# 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:
|
| 45 |
# model_id='https://pflgm2locj2t89co.us-east-1.aws.endpoints.huggingface.cloud'
|
| 46 |
|
| 47 |
-
|
| 48 |
-
#max_tokens=2096,
|
| 49 |
-
#temperature=0.5,
|
| 50 |
-
#model_id='Qwen/Qwen2.5-Coder-32B-Instruct',# it is possible that this model may be overloaded
|
| 51 |
-
#custom_role_conversions=None,
|
| 52 |
-
#)
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
model = InferenceClientModel(
|
| 56 |
max_tokens=2096,
|
|
|
|
| 57 |
model_id='Qwen/Qwen2.5-Coder-32B-Instruct',# it is possible that this model may be overloaded
|
| 58 |
custom_role_conversions=None,
|
| 59 |
-
temperature=0.5,
|
| 60 |
)
|
| 61 |
|
| 62 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 63 |
|
| 64 |
|
| 65 |
# Import tool from Hub
|
|
|
|
| 1 |
+
from smolagents import CodeAgent,DuckDuckGoSearchTool, HfApiModel,load_tool,tool
|
| 2 |
|
| 3 |
+
#from smolagents import CodeAgent,DuckDuckGoSearchTool, InferenceClientModel, load_tool,tool
|
| 4 |
|
| 5 |
|
| 6 |
|
|
|
|
| 44 |
# 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:
|
| 45 |
# model_id='https://pflgm2locj2t89co.us-east-1.aws.endpoints.huggingface.cloud'
|
| 46 |
|
| 47 |
+
model = HfApiModel(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 48 |
max_tokens=2096,
|
| 49 |
+
temperature=0.5,
|
| 50 |
model_id='Qwen/Qwen2.5-Coder-32B-Instruct',# it is possible that this model may be overloaded
|
| 51 |
custom_role_conversions=None,
|
|
|
|
| 52 |
)
|
| 53 |
|
| 54 |
|
| 55 |
+
#model = InferenceClientModel(
|
| 56 |
+
#max_tokens=2096,
|
| 57 |
+
#model_id='Qwen/Qwen2.5-Coder-32B-Instruct',# it is possible that this model may be overloaded
|
| 58 |
+
#custom_role_conversions=None,
|
| 59 |
+
#temperature=0.5,
|
| 60 |
+
#)
|
| 61 |
+
|
| 62 |
+
|
| 63 |
|
| 64 |
|
| 65 |
# Import tool from Hub
|