SunJacques commited on
Commit
df630be
·
verified ·
1 Parent(s): 9a8c112

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -3,7 +3,7 @@ import datetime
3
  import requests
4
  import pytz
5
  import yaml
6
- from tools.final_answer import FinalAnswerTool
7
 
8
  from Gradio_UI import GradioUI
9
 
@@ -42,6 +42,7 @@ model_id='https://wxknx1kg971u7k1n.us-east-1.aws.endpoints.huggingface.cloud',#
42
  custom_role_conversions=None,
43
  )
44
 
 
45
 
46
  # Import tool from Hub
47
  image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_code=True)
@@ -51,7 +52,7 @@ with open("prompts.yaml", 'r') as stream:
51
 
52
  agent = CodeAgent(
53
  model=model,
54
- tools=[final_answer], ## add your tools here (don't remove final answer)
55
  max_steps=6,
56
  verbosity_level=1,
57
  grammar=None,
 
3
  import requests
4
  import pytz
5
  import yaml
6
+ from tools.final_answer import FinalAnswerTool, DuckDuckGoSearchTool
7
 
8
  from Gradio_UI import GradioUI
9
 
 
42
  custom_role_conversions=None,
43
  )
44
 
45
+ web_search = DuckDuckGoSearchTool()
46
 
47
  # Import tool from Hub
48
  image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_code=True)
 
52
 
53
  agent = CodeAgent(
54
  model=model,
55
+ tools=[final_answer,web_search,get_current_time_in_timezone], ## add your tools here (don't remove final answer)
56
  max_steps=6,
57
  verbosity_level=1,
58
  grammar=None,