Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -13,9 +13,18 @@ from Gradio_UI import GradioUI
|
|
| 13 |
# -----------------------------
|
| 14 |
# TIME TOOL
|
| 15 |
# -----------------------------
|
|
|
|
| 16 |
@tool
|
| 17 |
def get_time(timezone: str) -> str:
|
| 18 |
-
"""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
try:
|
| 20 |
tz = pytz.timezone(timezone)
|
| 21 |
return datetime.datetime.now(tz).strftime("%Y-%m-%d %H:%M:%S")
|
|
|
|
| 13 |
# -----------------------------
|
| 14 |
# TIME TOOL
|
| 15 |
# -----------------------------
|
| 16 |
+
|
| 17 |
@tool
|
| 18 |
def get_time(timezone: str) -> str:
|
| 19 |
+
"""
|
| 20 |
+
Get current time in a specific timezone.
|
| 21 |
+
|
| 22 |
+
Args:
|
| 23 |
+
timezone (str): Name of timezone like 'Asia/Kathmandu', 'America/New_York'
|
| 24 |
+
|
| 25 |
+
Returns:
|
| 26 |
+
str: Current time in the given timezone
|
| 27 |
+
"""
|
| 28 |
try:
|
| 29 |
tz = pytz.timezone(timezone)
|
| 30 |
return datetime.datetime.now(tz).strftime("%Y-%m-%d %H:%M:%S")
|