Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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(
|
| 13 |
-
|
| 14 |
-
"""A tool that does nothing yet
|
| 15 |
Args:
|
| 16 |
-
|
| 17 |
-
|
| 18 |
"""
|
| 19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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:
|