Spaces:
Sleeping
Sleeping
Update agent.py
Browse files
agent.py
CHANGED
|
@@ -3,7 +3,7 @@ from smolagents import VisitWebpageTool, WebSearchTool, WikipediaSearchTool, Pyt
|
|
| 3 |
|
| 4 |
|
| 5 |
class GaiaAgent:
|
| 6 |
-
def
|
| 7 |
self.model = HfApiModel(
|
| 8 |
max_token = 2096,
|
| 9 |
temperature = 0.5,
|
|
@@ -34,7 +34,7 @@ class GaiaAgent:
|
|
| 34 |
#description="Brows the web to find information",
|
| 35 |
#additional_autorized_imports = ["pandas"],
|
| 36 |
)
|
| 37 |
-
def
|
| 38 |
try:
|
| 39 |
return self.agent.run(question)
|
| 40 |
except Exception as e:
|
|
|
|
| 3 |
|
| 4 |
|
| 5 |
class GaiaAgent:
|
| 6 |
+
def __init__(self):
|
| 7 |
self.model = HfApiModel(
|
| 8 |
max_token = 2096,
|
| 9 |
temperature = 0.5,
|
|
|
|
| 34 |
#description="Brows the web to find information",
|
| 35 |
#additional_autorized_imports = ["pandas"],
|
| 36 |
)
|
| 37 |
+
def __call__(self, question: str) -> str:
|
| 38 |
try:
|
| 39 |
return self.agent.run(question)
|
| 40 |
except Exception as e:
|