OlivierZ commited on
Commit
a6d8036
·
verified ·
1 Parent(s): 9f39c86

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -6
app.py CHANGED
@@ -9,14 +9,23 @@ from Gradio_UI import GradioUI
9
 
10
  # Below is an example of a tool that does nothing. Amaze us with your creativity !
11
  @tool
12
- def my_custom_tool(arg1:str, arg2:int)-> str: #it's import to specify the return type
13
- #Keep this format for the description / args / args description but feel free to modify the tool
14
- """A tool that does nothing yet
15
  Args:
16
- arg1: the first argument
17
- arg2: the second argument
18
  """
19
- return "What magic will you build ?"
 
 
 
 
 
 
 
 
 
 
20
 
21
  @tool
22
  def get_current_time_in_timezone(timezone: str) -> str:
 
9
 
10
  # Below is an example of a tool that does nothing. Amaze us with your creativity !
11
  @tool
12
+ def my_custom_tool(number1: int, number2: int) -> str:
13
+ """A tool that multiplies two integer inputs and returns the result as a string.
 
14
  Args:
15
+ number1: The first integer to multiply.
16
+ number2: The second integer to multiply.
17
  """
18
+ result = number1 * number2
19
+ return str(result)
20
+
21
+ # Example usage (not part of the tool definition itself)
22
+ if __name__ == "__main__":
23
+ output = multiply_tool(arg1=5, arg2=10)
24
+ print(f"The result of the multiplication is: {output}")
25
+
26
+ output_negative = multiply_tool(arg1=-3, arg2=7)
27
+ print(f"The result of the multiplication is: {output_negative}")
28
+
29
 
30
  @tool
31
  def get_current_time_in_timezone(timezone: str) -> str: