Spaces:
Sleeping
Sleeping
replace DuckDuckGo with SERPAPI, due to duckduck go timing out
Browse files
agent.py
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
from smolagents import CodeAgent, DuckDuckGoSearchTool, InferenceClientModel, VisitWebpageTool, OpenAIModel
|
| 2 |
|
| 3 |
from tools.wikipedia import get_wikipedia_article_sections, extract_wikipedia_section
|
| 4 |
from tools.images import analyse_image
|
|
@@ -8,7 +8,8 @@ from tools.audio import analyse_audio
|
|
| 8 |
class BasicAgent:
|
| 9 |
def __init__(self):
|
| 10 |
tools = [
|
| 11 |
-
DuckDuckGoSearchTool(),
|
|
|
|
| 12 |
VisitWebpageTool(),
|
| 13 |
get_wikipedia_article_sections,
|
| 14 |
extract_wikipedia_section,
|
|
|
|
| 1 |
+
from smolagents import CodeAgent, DuckDuckGoSearchTool, InferenceClientModel, VisitWebpageTool, OpenAIModel, GoogleSearchTool
|
| 2 |
|
| 3 |
from tools.wikipedia import get_wikipedia_article_sections, extract_wikipedia_section
|
| 4 |
from tools.images import analyse_image
|
|
|
|
| 8 |
class BasicAgent:
|
| 9 |
def __init__(self):
|
| 10 |
tools = [
|
| 11 |
+
# DuckDuckGoSearchTool(), # hits a timeout in huggingface spaces - ip blacklisted by duckduckgo?
|
| 12 |
+
GoogleSearchTool(),
|
| 13 |
VisitWebpageTool(),
|
| 14 |
get_wikipedia_article_sections,
|
| 15 |
extract_wikipedia_section,
|