ninooo96 commited on
Commit
18fc32b
·
1 Parent(s): ccc910e

add visit webpage

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -5,6 +5,7 @@ import pytz
5
  import yaml
6
  from tools.final_answer import FinalAnswerTool
7
  from tools.web_search import DuckDuckGoSearchTool
 
8
  import utils
9
 
10
  from Gradio_UI import GradioUI
@@ -76,6 +77,7 @@ def get_weather(city: str) -> str:
76
 
77
  final_answer = FinalAnswerTool()
78
  web_search = DuckDuckGoSearchTool()
 
79
  # If the agent does not answer, the model is overloaded, please use another model or the following Hugging Face Endpoint that also contains qwen2.5 coder:
80
  # model_id='https://pflgm2locj2t89co.us-east-1.aws.endpoints.huggingface.cloud'
81
 
@@ -95,8 +97,8 @@ with open("prompts.yaml", 'r') as stream:
95
 
96
  agent = CodeAgent(
97
  model=model,
98
- tools=[final_answer, web_search, get_current_time_in_timezone, get_weather], ## add your tools here (don't remove final answer)
99
- max_steps=6,
100
  verbosity_level=1,
101
  grammar=None,
102
  planning_interval=None,
 
5
  import yaml
6
  from tools.final_answer import FinalAnswerTool
7
  from tools.web_search import DuckDuckGoSearchTool
8
+ from tools.visit_webpage import VisitWebpageTool
9
  import utils
10
 
11
  from Gradio_UI import GradioUI
 
77
 
78
  final_answer = FinalAnswerTool()
79
  web_search = DuckDuckGoSearchTool()
80
+ visit_webpage = VisitWebpageTool()
81
  # If the agent does not answer, the model is overloaded, please use another model or the following Hugging Face Endpoint that also contains qwen2.5 coder:
82
  # model_id='https://pflgm2locj2t89co.us-east-1.aws.endpoints.huggingface.cloud'
83
 
 
97
 
98
  agent = CodeAgent(
99
  model=model,
100
+ tools=[final_answer, web_search, visit_webpage, get_current_time_in_timezone, get_weather], ## add your tools here (don't remove final answer)
101
+ max_steps=10,
102
  verbosity_level=1,
103
  grammar=None,
104
  planning_interval=None,