SamuelReyes commited on
Commit
34d2b9c
·
verified ·
1 Parent(s): 37e4e38

update call tools

Browse files
Files changed (1) hide show
  1. app.py +7 -2
app.py CHANGED
@@ -1,9 +1,12 @@
1
- from smolagents import CodeAgent,DuckDuckGoSearchTool, HfApiModel,load_tool,tool
2
  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
 
@@ -35,6 +38,8 @@ def get_current_time_in_timezone(timezone: str) -> str:
35
 
36
 
37
  final_answer = FinalAnswerTool()
 
 
38
  model = HfApiModel(
39
  max_tokens=2096,
40
  temperature=0.5,
@@ -51,7 +56,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,
 
1
+ from smolagents import CodeAgent, HfApiModel,load_tool,tool
2
  import datetime
3
  import requests
4
  import pytz
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
+
10
 
11
  from Gradio_UI import GradioUI
12
 
 
38
 
39
 
40
  final_answer = FinalAnswerTool()
41
+ visit = VisitWebpageTool()
42
+ webPage = DuckDuckGoSearchTool()
43
  model = HfApiModel(
44
  max_tokens=2096,
45
  temperature=0.5,
 
56
 
57
  agent = CodeAgent(
58
  model=model,
59
+ tools=[final_answer, visit, webPage], ## add your tools here (don't remove final answer)
60
  max_steps=6,
61
  verbosity_level=1,
62
  grammar=None,