Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -9,15 +9,29 @@ from tools.final_answer import FinalAnswerTool
|
|
| 9 |
from Gradio_UI import GradioUI
|
| 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
|
| 16 |
Args:
|
| 17 |
-
arg1: the
|
| 18 |
-
arg2: the
|
| 19 |
"""
|
| 20 |
-
|
|
|
|
|
|
|
|
|
|
| 21 |
|
| 22 |
@tool
|
| 23 |
def get_current_time_in_timezone(timezone: str) -> str:
|
|
|
|
| 9 |
from Gradio_UI import GradioUI
|
| 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 to create a personalized greeting repeated a specific number of times.
|
| 23 |
@tool
|
| 24 |
def my_custom_tool(arg1:str, arg2:int)-> str: #it's import to specify the return type
|
| 25 |
#Keep this format for the description / args / args description but feel free to modify the tool
|
| 26 |
+
"""A tool that creates a personalized greeting repeated multiple times.
|
| 27 |
Args:
|
| 28 |
+
arg1: the name or phrase to greet
|
| 29 |
+
arg2: the number of times to repeat the greeting
|
| 30 |
"""
|
| 31 |
+
greeting = f"Hello, {arg1}!"
|
| 32 |
+
return " ".join([greeting] * arg2)
|
| 33 |
+
|
| 34 |
+
|
| 35 |
|
| 36 |
@tool
|
| 37 |
def get_current_time_in_timezone(timezone: str) -> str:
|