Spaces:
Sleeping
Sleeping
Commit
·
a422271
1
Parent(s):
b1b295f
refine desc for arguments
Browse files
app.py
CHANGED
|
@@ -11,11 +11,16 @@ from Gradio_UI import GradioUI
|
|
| 11 |
@tool
|
| 12 |
def calculator(x:int, y:int, operator:str)-> int: #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 calculates math
|
|
|
|
| 15 |
Args:
|
| 16 |
-
x:
|
| 17 |
-
y:
|
| 18 |
-
operator:
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
"""
|
| 20 |
|
| 21 |
if operator == '+':
|
|
|
|
| 11 |
@tool
|
| 12 |
def calculator(x:int, y:int, operator:str)-> int: #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 calculates a math operation between two integers.
|
| 15 |
+
|
| 16 |
Args:
|
| 17 |
+
x (int): The first integer input.
|
| 18 |
+
y (int): The second integer input.
|
| 19 |
+
operator (str): The operation to perform. Supported: '+', '-', '*', '/'.
|
| 20 |
+
|
| 21 |
+
Returns:
|
| 22 |
+
int: The result of the calculation.
|
| 23 |
+
|
| 24 |
"""
|
| 25 |
|
| 26 |
if operator == '+':
|