MK-runner commited on
Commit
fb8f4b5
·
verified ·
1 Parent(s): 9a8c112

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -5
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
 
@@ -35,11 +36,12 @@ 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,
41
- model_id='https://wxknx1kg971u7k1n.us-east-1.aws.endpoints.huggingface.cloud',# it is possible that this model may be overloaded
42
- custom_role_conversions=None,
43
  )
44
 
45
 
@@ -51,7 +53,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,
 
4
  import pytz
5
  import yaml
6
  from tools.final_answer import FinalAnswerTool
7
+ from tools.web_search import DuckDuckGoSearchTool
8
 
9
  from Gradio_UI import GradioUI
10
 
 
36
 
37
 
38
  final_answer = FinalAnswerTool()
39
+ web_search = DuckDuckGoSearchTool()
40
  model = HfApiModel(
41
+ max_tokens=2096,
42
+ temperature=0.5,
43
+ model_id='https://wxknx1kg971u7k1n.us-east-1.aws.endpoints.huggingface.cloud',# it is possible that this model may be overloaded
44
+ custom_role_conversions=None,
45
  )
46
 
47
 
 
53
 
54
  agent = CodeAgent(
55
  model=model,
56
+ tools=[final_answer, web_search, image_generation_tool, my_cutom_tool, get_current_time_in_timezone], ## add your tools here (don't remove final answer)
57
  max_steps=6,
58
  verbosity_level=1,
59
  grammar=None,