Yerma commited on
Commit
d725999
·
verified ·
1 Parent(s): d7dfb86

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -5,6 +5,7 @@ import pytz
5
  import yaml
6
  from tools.final_answer import FinalAnswerTool
7
  from bs4 import BeautifulSoup
 
8
 
9
  from Gradio_UI import GradioUI
10
 
@@ -100,13 +101,16 @@ custom_role_conversions=None,
100
 
101
  # Import tool from Hub
102
  image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_code=True)
 
 
 
103
 
104
  with open("prompts.yaml", 'r') as stream:
105
  prompt_templates = yaml.safe_load(stream)
106
 
107
  agent = CodeAgent(
108
  model=model,
109
- tools=[final_answer,currency_converter,image_generation_tool], ## add your tools here (don't remove final answer)
110
  max_steps=6,
111
  verbosity_level=1,
112
  grammar=None,
 
5
  import yaml
6
  from tools.final_answer import FinalAnswerTool
7
  from bs4 import BeautifulSoup
8
+ from tools.web_search import DuckDuckGoSearchTool
9
 
10
  from Gradio_UI import GradioUI
11
 
 
101
 
102
  # Import tool from Hub
103
  image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_code=True)
104
+ web_search = DuckDuckGoSearchTool(max_results=10)
105
+
106
+
107
 
108
  with open("prompts.yaml", 'r') as stream:
109
  prompt_templates = yaml.safe_load(stream)
110
 
111
  agent = CodeAgent(
112
  model=model,
113
+ tools=[final_answer,currency_converter,image_generation_tool,web_search], ## add your tools here (don't remove final answer)
114
  max_steps=6,
115
  verbosity_level=1,
116
  grammar=None,