Leolx commited on
Commit
e8713c9
·
verified ·
1 Parent(s): 8aab7e0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -1
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
- """Get current time in timezone like Asia/Kathmandu"""
 
 
 
 
 
 
 
 
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")