Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -5,7 +5,6 @@ import pandas as pd
|
|
| 5 |
from smolagents import (
|
| 6 |
CodeAgent,
|
| 7 |
DuckDuckGoSearchTool,
|
| 8 |
-
PythonREPLTool,
|
| 9 |
OpenAIServerModel,
|
| 10 |
)
|
| 11 |
from smolagents.tools.python_repl import PythonREPL
|
|
@@ -25,7 +24,7 @@ class GaiaAgent:
|
|
| 25 |
)
|
| 26 |
# 2) Define the tools
|
| 27 |
self.search_tool = DuckDuckGoSearchTool()
|
| 28 |
-
self.python_tool =
|
| 29 |
# 3) Create the CodeAgent
|
| 30 |
self.agent = CodeAgent(
|
| 31 |
model=self.model,
|
|
|
|
| 5 |
from smolagents import (
|
| 6 |
CodeAgent,
|
| 7 |
DuckDuckGoSearchTool,
|
|
|
|
| 8 |
OpenAIServerModel,
|
| 9 |
)
|
| 10 |
from smolagents.tools.python_repl import PythonREPL
|
|
|
|
| 24 |
)
|
| 25 |
# 2) Define the tools
|
| 26 |
self.search_tool = DuckDuckGoSearchTool()
|
| 27 |
+
self.python_tool = PythonREPL(timeout=10) # Initialize PythonREPLTool
|
| 28 |
# 3) Create the CodeAgent
|
| 29 |
self.agent = CodeAgent(
|
| 30 |
model=self.model,
|