Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -9,7 +9,7 @@ import csv
|
|
9 |
import openpyxl
|
10 |
import io
|
11 |
|
12 |
-
from smolagents import CodeAgent, DuckDuckGoSearchTool, HfApiModel, tool, OpenAIServerModel
|
13 |
|
14 |
# (Keep Constants as is)
|
15 |
# --- Constants ---
|
@@ -22,8 +22,8 @@ class BasicAgent:
|
|
22 |
# model = OpenAIServerModel(model_id="gpt-4o")
|
23 |
model = HfApiModel()
|
24 |
|
25 |
-
self.agent =
|
26 |
-
tools=[DuckDuckGoSearchTool()],
|
27 |
additional_authorized_imports=['requests', 'bs4', 'csv', 'pandas', 'json', 'openpyxl', 'io', 'exec'],
|
28 |
model=model,
|
29 |
max_steps=10,
|
|
|
9 |
import openpyxl
|
10 |
import io
|
11 |
|
12 |
+
from smolagents import CodeAgent, ToolCallingAgent, DuckDuckGoSearchTool, GoogleSearchTool, PythonInterpreterTool, FinalAnswerTool, HfApiModel, tool, OpenAIServerModel
|
13 |
|
14 |
# (Keep Constants as is)
|
15 |
# --- Constants ---
|
|
|
22 |
# model = OpenAIServerModel(model_id="gpt-4o")
|
23 |
model = HfApiModel()
|
24 |
|
25 |
+
self.agent = ToolCallingAgent(
|
26 |
+
tools=[DuckDuckGoSearchTool(), GoogleSearchTool(), PythonInterpreterTool(), FinalAnswerTool()],
|
27 |
additional_authorized_imports=['requests', 'bs4', 'csv', 'pandas', 'json', 'openpyxl', 'io', 'exec'],
|
28 |
model=model,
|
29 |
max_steps=10,
|