Spaces:
Runtime error
Runtime error
app.py
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
from smolagents import CodeAgent, DuckDuckGoSearchTool,
|
| 2 |
import datetime
|
| 3 |
import requests
|
| 4 |
import pytz
|
|
@@ -21,7 +21,7 @@ os.environ["HUGGINGFACE_API_TOKEN"] = os.getenv("HUGGINGFACE_API_KEY", "")
|
|
| 21 |
|
| 22 |
# Initialize the standard search tools
|
| 23 |
ddg_search_tool = DuckDuckGoSearchTool(max_results=10) # Default is 10 results
|
| 24 |
-
google_search_tool = GoogleSearchTool()
|
| 25 |
|
| 26 |
#@weave.op()
|
| 27 |
def tracked_perplexity_call(prompt: str, system_messages: str, model_name: str = "sonar-pro", assistant_meta: bool = False):
|
|
@@ -263,7 +263,7 @@ agent = CodeAgent(
|
|
| 263 |
final_answer,
|
| 264 |
Sonar_Web_Search_Tool,
|
| 265 |
ddg_search_tool, # Added DuckDuckGo search tool
|
| 266 |
-
google_search_tool, # Added Google search tool
|
| 267 |
get_current_time_in_timezone,
|
| 268 |
image_generation_tool,
|
| 269 |
Dataset_Creator_Tool,
|
|
|
|
| 1 |
+
from smolagents import CodeAgent, DuckDuckGoSearchTool, HfApiModel, load_tool, tool
|
| 2 |
import datetime
|
| 3 |
import requests
|
| 4 |
import pytz
|
|
|
|
| 21 |
|
| 22 |
# Initialize the standard search tools
|
| 23 |
ddg_search_tool = DuckDuckGoSearchTool(max_results=10) # Default is 10 results
|
| 24 |
+
# google_search_tool = GoogleSearchTool()
|
| 25 |
|
| 26 |
#@weave.op()
|
| 27 |
def tracked_perplexity_call(prompt: str, system_messages: str, model_name: str = "sonar-pro", assistant_meta: bool = False):
|
|
|
|
| 263 |
final_answer,
|
| 264 |
Sonar_Web_Search_Tool,
|
| 265 |
ddg_search_tool, # Added DuckDuckGo search tool
|
| 266 |
+
# google_search_tool, # Added Google search tool
|
| 267 |
get_current_time_in_timezone,
|
| 268 |
image_generation_tool,
|
| 269 |
Dataset_Creator_Tool,
|