david-clifford commited on
Commit
cbe992d
·
verified ·
1 Parent(s): 4553e62

Expand - try to add visit_webpage_tool

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -46,14 +46,17 @@ model = HfApiModel(
46
 
47
 
48
  # Import tool from Hub
49
- image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_code=True)
 
 
 
50
 
51
  with open("prompts.yaml", 'r') as stream:
52
  prompt_templates = yaml.safe_load(stream)
53
 
54
  agent = CodeAgent(
55
  model=model,
56
- tools=[final_answer, get_current_time_in_timezone, image_generation_tool], ## add your tools here (don't remove final answer)
57
  max_steps=6,
58
  verbosity_level=1,
59
  grammar=None,
 
46
 
47
 
48
  # Import tool from Hub
49
+ image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_code=True) ## https://huggingface.co/spaces/agents-course/text-to-image
50
+
51
+ # Import other tools
52
+ visit_webage_tool = load_tool("tools/visit_webpage.py")
53
 
54
  with open("prompts.yaml", 'r') as stream:
55
  prompt_templates = yaml.safe_load(stream)
56
 
57
  agent = CodeAgent(
58
  model=model,
59
+ tools=[final_answer, get_current_time_in_timezone, image_generation_tool, visit_webage_tool], ## add your tools here (don't remove final answer)
60
  max_steps=6,
61
  verbosity_level=1,
62
  grammar=None,