Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -8,6 +8,17 @@ from tools.final_answer import FinalAnswerTool
|
|
| 8 |
from Gradio_UI import GradioUI
|
| 9 |
|
| 10 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
@tool
|
| 12 |
def get_current_time_in_timezone(timezone: str) -> str:
|
| 13 |
"""A tool that fetches the current local time in a specified timezone.
|
|
@@ -32,9 +43,6 @@ def simple_calculator(a: float, b: float, operation: str) -> float:
|
|
| 32 |
a: First number.
|
| 33 |
b: Second number.
|
| 34 |
operation: The operation to perform. Supported values: '+', '-', '*', '/'.
|
| 35 |
-
|
| 36 |
-
Returns:
|
| 37 |
-
The result of the operation.
|
| 38 |
"""
|
| 39 |
if operation == '+':
|
| 40 |
return a + b
|
|
|
|
| 8 |
from Gradio_UI import GradioUI
|
| 9 |
|
| 10 |
|
| 11 |
+
# Below is an example of a tool that does nothing. Amaze us with your creativity !
|
| 12 |
+
@tool
|
| 13 |
+
def my_custom_tool(arg1:str, arg2:int)-> str: #it's import to specify the return type
|
| 14 |
+
#Keep this format for the description / args / args description but feel free to modify the tool
|
| 15 |
+
"""A tool that does nothing yet
|
| 16 |
+
Args:
|
| 17 |
+
arg1: the first argument
|
| 18 |
+
arg2: the second argument
|
| 19 |
+
"""
|
| 20 |
+
return "What magic will you build ?"
|
| 21 |
+
|
| 22 |
@tool
|
| 23 |
def get_current_time_in_timezone(timezone: str) -> str:
|
| 24 |
"""A tool that fetches the current local time in a specified timezone.
|
|
|
|
| 43 |
a: First number.
|
| 44 |
b: Second number.
|
| 45 |
operation: The operation to perform. Supported values: '+', '-', '*', '/'.
|
|
|
|
|
|
|
|
|
|
| 46 |
"""
|
| 47 |
if operation == '+':
|
| 48 |
return a + b
|