Da-Rabbit-Hole commited on
Commit
d2723b0
·
verified ·
1 Parent(s): 40748dd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -23
app.py CHANGED
@@ -249,29 +249,8 @@ CustomDuckDuckGoSearchTool(WebSearchTool)
249
  output_type = "string"
250
  """
251
 
252
- tool = CustomDuckDuckGoSearchTool(
253
- max_results=3,
254
- rate_limit=1.0,)
255
- result = tool(query='()')
256
- print(result)
257
-
258
- # Import tool from Hub
259
- image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_code=True)
260
-
261
- with open("prompts.yaml", 'r') as stream:
262
- prompt_templates = yaml.safe_load(stream)
263
-
264
- agent = CodeAgent(
265
- model=model,
266
- tools=[final_answer], ## add your tools here (don't remove final answer)
267
- max_steps=6,
268
- verbosity_level=1,
269
- grammar=None,
270
- planning_interval=None,
271
- name=None,
272
- description=None,
273
- prompt_templates=prompt_templates
274
- )
275
 
276
 
277
  GradioUI(agent).launch()
 
249
  output_type = "string"
250
  """
251
 
252
+ search_tool = DuckDuckGoSearchTool()
253
+ agent = CodeAgent(tools=[search_tool], model=model, add_base_tools=False, verbosity_level=2)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
254
 
255
 
256
  GradioUI(agent).launch()