Spaces:
Sleeping
Sleeping
Update app.py
Browse filestried another way to use duckduck
app.py
CHANGED
|
@@ -4,6 +4,7 @@ import requests
|
|
| 4 |
import pytz
|
| 5 |
import yaml
|
| 6 |
from tools.final_answer import FinalAnswerTool
|
|
|
|
| 7 |
|
| 8 |
from Gradio_UI import GradioUI
|
| 9 |
|
|
@@ -19,7 +20,7 @@ from Gradio_UI import GradioUI
|
|
| 19 |
# return "What magic will you build ?"
|
| 20 |
|
| 21 |
# Load the DuckDuckGo search tool
|
| 22 |
-
ddg =
|
| 23 |
|
| 24 |
@tool
|
| 25 |
def my_custom_tool(city1: str, city2: str) -> str:
|
|
|
|
| 4 |
import pytz
|
| 5 |
import yaml
|
| 6 |
from tools.final_answer import FinalAnswerTool
|
| 7 |
+
from smolagents.tools.search import DuckDuckGoSearchTool
|
| 8 |
|
| 9 |
from Gradio_UI import GradioUI
|
| 10 |
|
|
|
|
| 20 |
# return "What magic will you build ?"
|
| 21 |
|
| 22 |
# Load the DuckDuckGo search tool
|
| 23 |
+
ddg = DuckDuckGoSearchTool()
|
| 24 |
|
| 25 |
@tool
|
| 26 |
def my_custom_tool(city1: str, city2: str) -> str:
|