Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -21,19 +21,19 @@ from Gradio_UI import GradioUI
|
|
21 |
#return "What magic will you build ?"
|
22 |
|
23 |
@tool
|
24 |
-
def get_current_time_in_timezone(timezone: str) -> str:
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
# Get current time in that timezone
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
|
38 |
|
39 |
final_answer = FinalAnswerTool()
|
|
|
21 |
#return "What magic will you build ?"
|
22 |
|
23 |
@tool
|
24 |
+
#def get_current_time_in_timezone(timezone: str) -> str:
|
25 |
+
# """A tool that fetches the current local time in a specified timezone.
|
26 |
+
# Args:
|
27 |
+
# timezone: A string representing a valid timezone (e.g., 'America/New_York').
|
28 |
+
# """
|
29 |
+
# try:
|
30 |
+
## # Create timezone object
|
31 |
+
## tz = pytz.timezone(timezone)
|
32 |
# Get current time in that timezone
|
33 |
+
## local_time = datetime.datetime.now(tz).strftime("%Y-%m-%d %H:%M:%S")
|
34 |
+
## return f"The current local time in {timezone} is: {local_time}"
|
35 |
+
## except Exception as e:
|
36 |
+
## return f"Error fetching time for timezone '{timezone}': {str(e)}"
|
37 |
|
38 |
|
39 |
final_answer = FinalAnswerTool()
|