Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -4,6 +4,7 @@ import requests
|
|
4 |
import pytz
|
5 |
import yaml
|
6 |
from tools.final_answer import FinalAnswerTool
|
|
|
7 |
|
8 |
from Gradio_UI import GradioUI
|
9 |
|
@@ -26,7 +27,7 @@ def calculate_time_difference_to_helsinki(local_time:datetime)-> str: #it's impo
|
|
26 |
return f"Error fetching the time difference to Helsinki: {str(e)}"
|
27 |
|
28 |
@tool
|
29 |
-
def get_current_time_in_timezone(timezone: str) -> str:
|
30 |
"""A tool that fetches the current local time in a specified timezone.
|
31 |
Args:
|
32 |
timezone: A string representing a valid timezone (e.g., 'America/New_York').
|
|
|
4 |
import pytz
|
5 |
import yaml
|
6 |
from tools.final_answer import FinalAnswerTool
|
7 |
+
from typing import Union
|
8 |
|
9 |
from Gradio_UI import GradioUI
|
10 |
|
|
|
27 |
return f"Error fetching the time difference to Helsinki: {str(e)}"
|
28 |
|
29 |
@tool
|
30 |
+
def get_current_time_in_timezone(timezone: str) -> Union[str, datetime]:
|
31 |
"""A tool that fetches the current local time in a specified timezone.
|
32 |
Args:
|
33 |
timezone: A string representing a valid timezone (e.g., 'America/New_York').
|