roger33303 commited on
Commit
dc9ccac
·
verified ·
1 Parent(s): 209e858

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -7,7 +7,7 @@ from tools.final_answer import FinalAnswerTool
7
 
8
  from Gradio_UI import GradioUI
9
 
10
-
11
  def string_reverse_tool(arg1:str)-> str: #it's import to specify the return type
12
  #Keep this format for the description / args / args description but feel free to modify the tool
13
  """A tool that can reverse any string
@@ -34,7 +34,7 @@ def get_current_time_in_timezone(timezone: str) -> str:
34
 
35
  # web_search_tool =DuckDuckGoSearchTool()
36
  # Import tool from Hub
37
- # image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_code=True)
38
 
39
 
40
  final_answer = FinalAnswerTool()
@@ -57,7 +57,7 @@ with open("prompts.yaml", 'r') as stream:
57
 
58
  agent = CodeAgent(
59
  model=model,
60
- tools=[final_answer,get_current_time_in_timezone], ## add your tools here (don't remove final answer)
61
  max_steps=6,
62
  verbosity_level=1,
63
  grammar=None,
 
7
 
8
  from Gradio_UI import GradioUI
9
 
10
+ @tool
11
  def string_reverse_tool(arg1:str)-> str: #it's import to specify the return type
12
  #Keep this format for the description / args / args description but feel free to modify the tool
13
  """A tool that can reverse any string
 
34
 
35
  # web_search_tool =DuckDuckGoSearchTool()
36
  # Import tool from Hub
37
+ image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_code=True)
38
 
39
 
40
  final_answer = FinalAnswerTool()
 
57
 
58
  agent = CodeAgent(
59
  model=model,
60
+ tools=[final_answer,get_current_time_in_timezone,string_reverse_tool,image_generation_tool], ## add your tools here (don't remove final answer)
61
  max_steps=6,
62
  verbosity_level=1,
63
  grammar=None,