Spaces:
Sleeping
Sleeping
Update BasicAgent.py
Browse files- BasicAgent.py +2 -2
BasicAgent.py
CHANGED
@@ -12,7 +12,7 @@ from smolagents import (
|
|
12 |
)
|
13 |
|
14 |
#*
|
15 |
-
@
|
16 |
def read_excel(self, file_path, sheet_name=0):
|
17 |
"""
|
18 |
Read an Excel file into a pandas DataFrame.
|
@@ -49,7 +49,7 @@ class newAgent:
|
|
49 |
model = HfApiModel(model_id=model_id, token=hf_token)
|
50 |
|
51 |
# include FinalAnswerTool in tools so agent knows when to stop
|
52 |
-
tools = [FinalAnswerTool()]
|
53 |
self.agent = CodeAgent(
|
54 |
tools=tools,
|
55 |
model=model,
|
|
|
12 |
)
|
13 |
|
14 |
#*
|
15 |
+
@tool
|
16 |
def read_excel(self, file_path, sheet_name=0):
|
17 |
"""
|
18 |
Read an Excel file into a pandas DataFrame.
|
|
|
49 |
model = HfApiModel(model_id=model_id, token=hf_token)
|
50 |
|
51 |
# include FinalAnswerTool in tools so agent knows when to stop
|
52 |
+
tools = [FinalAnswerTool(), read_excel()]
|
53 |
self.agent = CodeAgent(
|
54 |
tools=tools,
|
55 |
model=model,
|