Sneaksie commited on
Commit
6be1430
·
verified ·
1 Parent(s): 1b5cc63

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -1
app.py CHANGED
@@ -4,6 +4,8 @@ import requests
4
  import pytz
5
  import yaml
6
  import re
 
 
7
  from tools.final_answer import FinalAnswerTool
8
 
9
  from Gradio_UI import GradioUI
@@ -41,7 +43,11 @@ def get_current_time_in_timezone(timezone: str) -> str:
41
  return f"Error fetching time for timezone '{timezone}': {str(e)}"
42
 
43
 
 
 
 
44
  final_answer = FinalAnswerTool()
 
45
  model = HfApiModel(
46
  max_tokens=2096,
47
  temperature=0.5,
@@ -69,4 +75,8 @@ agent = CodeAgent(
69
  )
70
 
71
 
72
- GradioUI(agent).launch()
 
 
 
 
 
4
  import pytz
5
  import yaml
6
  import re
7
+ from tools.visit_webpage import VisitWebpageTool
8
+ from tools.web_search import DuckDuckGoSearchTool
9
  from tools.final_answer import FinalAnswerTool
10
 
11
  from Gradio_UI import GradioUI
 
43
  return f"Error fetching time for timezone '{timezone}': {str(e)}"
44
 
45
 
46
+
47
+ visit_webpage = VisitWebpageTool()
48
+ web_search = DuckDuckGoSearchTool()
49
  final_answer = FinalAnswerTool()
50
+
51
  model = HfApiModel(
52
  max_tokens=2096,
53
  temperature=0.5,
 
75
  )
76
 
77
 
78
+ if __name__ == "__main__":
79
+ try:
80
+ GradioUI(agent).launch()
81
+ except Exception as e:
82
+ print(f"Error launching GradioUI: {str(e)}")