Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -11,21 +11,19 @@ from Gradio_UI import GradioUI
|
|
11 |
|
12 |
# Below is the new deadline calculator tool
|
13 |
|
14 |
-
|
15 |
@tool
|
16 |
def deadline_calculator(start_date: str, days: int) -> str:
|
17 |
-
"""
|
18 |
-
|
19 |
-
|
20 |
Args:
|
21 |
-
start_date
|
22 |
-
days
|
23 |
|
24 |
Returns:
|
25 |
-
|
26 |
-
- "Deadline"
|
27 |
-
- "Day of Week"
|
28 |
-
- "Error"
|
29 |
|
30 |
Example:
|
31 |
>>> deadline_calculator("2025-02-18", 10)
|
|
|
11 |
|
12 |
# Below is the new deadline calculator tool
|
13 |
|
|
|
14 |
@tool
|
15 |
def deadline_calculator(start_date: str, days: int) -> str:
|
16 |
+
"""A tool that calculates the deadline date based on a given start date and duration in days.
|
17 |
+
|
|
|
18 |
Args:
|
19 |
+
start_date: The starting date in 'YYYY-MM-DD' format.
|
20 |
+
days: The number of days until the deadline.
|
21 |
|
22 |
Returns:
|
23 |
+
A JSON-formatted string containing:
|
24 |
+
- "Deadline": The calculated deadline date in 'YYYY-MM-DD' format.
|
25 |
+
- "Day of Week": The corresponding day of the week for the deadline.
|
26 |
+
- "Error": If an invalid date format is provided, an error message.
|
27 |
|
28 |
Example:
|
29 |
>>> deadline_calculator("2025-02-18", 10)
|