wav3byte commited on
Commit
ae7671a
·
verified ·
1 Parent(s): 419c9a1

Update app.py

Browse files

Added visit_webpage tool.

Files changed (1) hide show
  1. app.py +6 -1
app.py CHANGED
@@ -4,6 +4,7 @@ import requests
4
  import pytz
5
  import yaml
6
  from tools.final_answer import FinalAnswerTool
 
7
 
8
  from Gradio_UI import GradioUI
9
 
@@ -33,6 +34,7 @@ def get_current_time_in_timezone(timezone: str) -> str:
33
  except Exception as e:
34
  return f"Error fetching time for timezone '{timezone}': {str(e)}"
35
 
 
36
  web_search = DuckDuckGoSearchTool()
37
  final_answer = FinalAnswerTool()
38
 
@@ -55,7 +57,10 @@ with open("prompts.yaml", 'r') as stream:
55
 
56
  agent = CodeAgent(
57
  model=model,
58
- tools=[final_answer, get_current_time_in_timezone, web_search], ## add your tools here (don't remove final answer)
 
 
 
59
  max_steps=6,
60
  verbosity_level=1,
61
  grammar=None,
 
4
  import pytz
5
  import yaml
6
  from tools.final_answer import FinalAnswerTool
7
+ from tools.visit_webpage import VisitWebpageTool
8
 
9
  from Gradio_UI import GradioUI
10
 
 
34
  except Exception as e:
35
  return f"Error fetching time for timezone '{timezone}': {str(e)}"
36
 
37
+ visit_webpage = VisitWebpageTool()
38
  web_search = DuckDuckGoSearchTool()
39
  final_answer = FinalAnswerTool()
40
 
 
57
 
58
  agent = CodeAgent(
59
  model=model,
60
+ tools=[final_answer,
61
+ get_current_time_in_timezone,
62
+ web_search,
63
+ visit_webpage], ## add your tools here (don't remove final answer)
64
  max_steps=6,
65
  verbosity_level=1,
66
  grammar=None,