petkar commited on
Commit
7d00a22
·
verified ·
1 Parent(s): 8bb6bd6

Update app.py

Browse files

tried another way to use duckduck

Files changed (1) hide show
  1. app.py +2 -1
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 = load_tool("duckduckgo",trust_remote_code=True)
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: