Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -4,7 +4,6 @@ import requests
|
|
| 4 |
import inspect
|
| 5 |
import pandas as pd
|
| 6 |
from smolagents import CodeAgent, LiteLLMModel, DuckDuckGoSearchTool, VisitWebpageTool
|
| 7 |
-
from transformers.agents import PythonInterpreterTool
|
| 8 |
|
| 9 |
# (Keep Constants as is)
|
| 10 |
# --- Constants ---
|
|
@@ -27,11 +26,10 @@ class BasicAgent():
|
|
| 27 |
# Outils disponibles
|
| 28 |
search_tool = DuckDuckGoSearchTool()
|
| 29 |
webpage_tool = VisitWebpageTool()
|
| 30 |
-
python_tool = PythonInterpreterTool() # Pour exécuter du code Python/pandas
|
| 31 |
|
| 32 |
# Créer l'agent Alfred avec les outils
|
| 33 |
self.alfred = CodeAgent(
|
| 34 |
-
tools=[search_tool, webpage_tool
|
| 35 |
model=self.model,
|
| 36 |
additional_authorized_imports=["pandas", "numpy"],
|
| 37 |
max_steps = 15
|
|
|
|
| 4 |
import inspect
|
| 5 |
import pandas as pd
|
| 6 |
from smolagents import CodeAgent, LiteLLMModel, DuckDuckGoSearchTool, VisitWebpageTool
|
|
|
|
| 7 |
|
| 8 |
# (Keep Constants as is)
|
| 9 |
# --- Constants ---
|
|
|
|
| 26 |
# Outils disponibles
|
| 27 |
search_tool = DuckDuckGoSearchTool()
|
| 28 |
webpage_tool = VisitWebpageTool()
|
|
|
|
| 29 |
|
| 30 |
# Créer l'agent Alfred avec les outils
|
| 31 |
self.alfred = CodeAgent(
|
| 32 |
+
tools=[search_tool, webpage_tool],
|
| 33 |
model=self.model,
|
| 34 |
additional_authorized_imports=["pandas", "numpy"],
|
| 35 |
max_steps = 15
|