Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -5,7 +5,7 @@ import inspect
|
|
| 5 |
import pandas as pd
|
| 6 |
from langchain_google_genai import ChatGoogleGenerativeAI
|
| 7 |
from tools import InternetSearchTool, WeatherInfoTool
|
| 8 |
-
from smolagents import CodeAgent
|
| 9 |
|
| 10 |
# (Keep Constants as is)
|
| 11 |
# --- Constants ---
|
|
@@ -28,7 +28,7 @@ class BasicAgent:
|
|
| 28 |
# Create agent
|
| 29 |
self.agent= CodeAgent(
|
| 30 |
tools=[weather_info_tool, search_tool],
|
| 31 |
-
|
| 32 |
add_base_tools=True, # Add any additional base tools
|
| 33 |
planning_interval=3 # Enable planning every 3 steps
|
| 34 |
)
|
|
|
|
| 5 |
import pandas as pd
|
| 6 |
from langchain_google_genai import ChatGoogleGenerativeAI
|
| 7 |
from tools import InternetSearchTool, WeatherInfoTool
|
| 8 |
+
from smolagents import CodeAgent, InferenceClientModel
|
| 9 |
|
| 10 |
# (Keep Constants as is)
|
| 11 |
# --- Constants ---
|
|
|
|
| 28 |
# Create agent
|
| 29 |
self.agent= CodeAgent(
|
| 30 |
tools=[weather_info_tool, search_tool],
|
| 31 |
+
model=InferenceClientModel(token=os.getenv("HF_TOKEN"), provider="together"),
|
| 32 |
add_base_tools=True, # Add any additional base tools
|
| 33 |
planning_interval=3 # Enable planning every 3 steps
|
| 34 |
)
|