LucMarcelPellinger commited on
Commit
643473f
·
verified ·
1 Parent(s): a07f2e8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -11
app.py CHANGED
@@ -10,15 +10,16 @@ from datetime import datetime
10
  from Gradio_UI import GradioUI
11
 
12
  # Below is an example of a tool that does nothing. Amaze us with your creativity !
13
- #@tool
14
- #def my_custom_tool(arg1:str, arg2:int)-> str: #it's import to specify the return type
15
- # #Keep this format for the description / args / args description but feel free to modify the tool
16
- # """A tool that does nothing yet
17
- # Args:
18
- # arg1: the first argument
19
- # arg2: the second argument
20
- # """
21
- # return "What magic will you build ?"
 
22
 
23
  @tool
24
  def todays_useless_fact(date: datetime) -> str:
@@ -81,8 +82,9 @@ agent = CodeAgent(
81
  model=model,
82
  tools=[
83
  final_answer,
84
- get_current_time_in_timezone,
85
- todays_useless_fact # Include this!
 
86
  ], ## add your tools here (don't remove final answer)
87
  max_steps=6,
88
  verbosity_level=1,
 
10
  from Gradio_UI import GradioUI
11
 
12
  # Below is an example of a tool that does nothing. Amaze us with your creativity !
13
+ @tool
14
+ def my_custom_tool(arg1:int, arg2:int)-> str: #it's import to specify the return type
15
+ #Keep this format for the description / args / args description but feel free to modify the tool
16
+ """A tool that does nothing yet
17
+ Args:
18
+ arg1: the first argument
19
+ arg2: the second argument
20
+ """
21
+ a = arg1 + arg2
22
+ return f"the result is {a}"
23
 
24
  @tool
25
  def todays_useless_fact(date: datetime) -> str:
 
82
  model=model,
83
  tools=[
84
  final_answer,
85
+ get_current_time_in_timezone,
86
+ image_generation_tool,
87
+ my_custom_tool # Include this!
88
  ], ## add your tools here (don't remove final answer)
89
  max_steps=6,
90
  verbosity_level=1,