Spaces:
Sleeping
Sleeping
update
Browse files
app.py
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
from smolagents import DuckDuckGoSearchTool, GradioUI, InferenceClientModel, Tool
|
| 2 |
|
| 3 |
|
| 4 |
class AddTool(Tool):
|
|
@@ -27,9 +27,9 @@ class SubtractTool(Tool):
|
|
| 27 |
return a - b
|
| 28 |
|
| 29 |
|
| 30 |
-
agent =
|
| 31 |
tools=[AddTool(), SubtractTool(), DuckDuckGoSearchTool()],
|
| 32 |
-
model=InferenceClientModel(model_id="Qwen/Qwen2.5-
|
| 33 |
name="calculator_agent",
|
| 34 |
description="An agent that can perform arithmetic (addition, subtraction) and search the web.",
|
| 35 |
max_steps=10,
|
|
|
|
| 1 |
+
from smolagents import CodeAgent, DuckDuckGoSearchTool, GradioUI, InferenceClientModel, Tool
|
| 2 |
|
| 3 |
|
| 4 |
class AddTool(Tool):
|
|
|
|
| 27 |
return a - b
|
| 28 |
|
| 29 |
|
| 30 |
+
agent = CodeAgent(
|
| 31 |
tools=[AddTool(), SubtractTool(), DuckDuckGoSearchTool()],
|
| 32 |
+
model=InferenceClientModel(model_id="Qwen/Qwen2.5-Coder-32B-Instruct"),
|
| 33 |
name="calculator_agent",
|
| 34 |
description="An agent that can perform arithmetic (addition, subtraction) and search the web.",
|
| 35 |
max_steps=10,
|