Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -11,7 +11,7 @@ from pathlib import Path
|
|
| 11 |
from tabulate import tabulate
|
| 12 |
from typing import Union, Optional
|
| 13 |
from smolagents.tools import PipelineTool, Tool
|
| 14 |
-
from smolagents import OpenAIServerModel, DuckDuckGoSearchTool, CodeAgent, WikipediaSearchTool
|
| 15 |
|
| 16 |
|
| 17 |
DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
|
|
@@ -134,7 +134,13 @@ class BasicAgent:
|
|
| 134 |
def __init__(self):
|
| 135 |
self.agent = CodeAgent(
|
| 136 |
model=OpenAIServerModel(model_id="gpt-4o"),
|
| 137 |
-
tools=[
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 138 |
add_base_tools=True,
|
| 139 |
additional_authorized_imports=['pandas','numpy','csv','subprocess']
|
| 140 |
)
|
|
|
|
| 11 |
from tabulate import tabulate
|
| 12 |
from typing import Union, Optional
|
| 13 |
from smolagents.tools import PipelineTool, Tool
|
| 14 |
+
from smolagents import OpenAIServerModel, DuckDuckGoSearchTool, CodeAgent, WikipediaSearchTool, PythonInterpreterTool
|
| 15 |
|
| 16 |
|
| 17 |
DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
|
|
|
|
| 134 |
def __init__(self):
|
| 135 |
self.agent = CodeAgent(
|
| 136 |
model=OpenAIServerModel(model_id="gpt-4o"),
|
| 137 |
+
tools=[
|
| 138 |
+
DuckDuckGoSearchTool(),
|
| 139 |
+
WikipediaSearchTool(),
|
| 140 |
+
PythonInterpreterTool(),
|
| 141 |
+
#SpeechToTextTool(),
|
| 142 |
+
#ExcelToTextTool()
|
| 143 |
+
],
|
| 144 |
add_base_tools=True,
|
| 145 |
additional_authorized_imports=['pandas','numpy','csv','subprocess']
|
| 146 |
)
|