Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -18,17 +18,17 @@ def my_custom_tool(arg1:str, arg2:int)-> str: #it's import to specify the return
|
|
| 18 |
"""
|
| 19 |
return "What magic will you build ?"
|
| 20 |
|
| 21 |
-
|
| 22 |
@tool
|
| 23 |
def countdown_tool(event_date: str, duration: int) -> str:
|
| 24 |
-
"""
|
| 25 |
|
| 26 |
Args:
|
| 27 |
-
event_date (str): The date and time
|
| 28 |
-
duration (int): A placeholder
|
| 29 |
|
| 30 |
Returns:
|
| 31 |
-
str: A message
|
| 32 |
"""
|
| 33 |
try:
|
| 34 |
event_datetime = datetime.datetime.strptime(event_date, "%Y-%m-%d %H:%M")
|
|
|
|
| 18 |
"""
|
| 19 |
return "What magic will you build ?"
|
| 20 |
|
| 21 |
+
|
| 22 |
@tool
|
| 23 |
def countdown_tool(event_date: str, duration: int) -> str:
|
| 24 |
+
"""Calculates the remaining time until a specified event.
|
| 25 |
|
| 26 |
Args:
|
| 27 |
+
event_date (str): The event's date and time in the format "YYYY-MM-DD HH:MM".
|
| 28 |
+
duration (int): A placeholder argument (not used in calculations).
|
| 29 |
|
| 30 |
Returns:
|
| 31 |
+
str: A message displaying the time remaining until the event.
|
| 32 |
"""
|
| 33 |
try:
|
| 34 |
event_datetime = datetime.datetime.strptime(event_date, "%Y-%m-%d %H:%M")
|