aljagne commited on
Commit
994c647
·
verified ·
1 Parent(s): 4c2ed1a

Update app.py

Browse files

another ajusment

Files changed (1) hide show
  1. app.py +9 -1
app.py CHANGED
@@ -4,6 +4,9 @@ import requests
4
  import pytz
5
  import yaml
6
  from tools.final_answer import FinalAnswerTool
 
 
 
7
 
8
  from Gradio_UI import GradioUI
9
 
@@ -34,7 +37,11 @@ def get_current_time_in_timezone(timezone: str) -> str:
34
  return f"Error fetching time for timezone '{timezone}': {str(e)}"
35
 
36
 
 
37
  final_answer = FinalAnswerTool()
 
 
 
38
  model = HfApiModel(
39
  max_tokens=2096,
40
  temperature=0.5,
@@ -54,7 +61,8 @@ agent = CodeAgent(
54
  tools=[
55
  final_answer,
56
  visit_webpage,
57
- duckduckgo_search], ## add your tools here (don't remove final answer)
 
58
  max_steps=6,
59
  verbosity_level=1,
60
  grammar=None,
 
4
  import pytz
5
  import yaml
6
  from tools.final_answer import FinalAnswerTool
7
+ from tools.visit_webpage import VisitWebpageTool
8
+
9
+
10
 
11
  from Gradio_UI import GradioUI
12
 
 
37
  return f"Error fetching time for timezone '{timezone}': {str(e)}"
38
 
39
 
40
+ # Initialize tools
41
  final_answer = FinalAnswerTool()
42
+ visit_webpage_tool = VisitWebpageTool()
43
+ duckduckgo_search_tool = DuckDuckGoSearchTool()
44
+
45
  model = HfApiModel(
46
  max_tokens=2096,
47
  temperature=0.5,
 
61
  tools=[
62
  final_answer,
63
  visit_webpage,
64
+ duckduckgo_search
65
+ ], ## add your tools here (don't remove final answer)
66
  max_steps=6,
67
  verbosity_level=1,
68
  grammar=None,