Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -9,7 +9,7 @@ from Gradio_UI import GradioUI
|
|
| 9 |
|
| 10 |
# Below is an example of a tool that does nothing. Amaze us with your creativity !
|
| 11 |
@tool
|
| 12 |
-
def countries_with_same_current_offset(timezone : str
|
| 13 |
"""A tool that fetches a list of all countries that have the same current UTC offset as the given timezone_name.
|
| 14 |
Args:
|
| 15 |
timezone: A string representing a valid timezone (e.g., 'America/New_York').
|
|
@@ -29,7 +29,7 @@ def countries_with_same_current_offset(timezone : str, return_country_names : bo
|
|
| 29 |
ref_offset = now_utc.astimezone(ref_tz).utcoffset()
|
| 30 |
|
| 31 |
matching_countries = []
|
| 32 |
-
|
| 33 |
# Traverse all known countries in pytz
|
| 34 |
for country_code, timezones in pytz.country_timezones.items():
|
| 35 |
for tz_name in timezones:
|
|
|
|
| 9 |
|
| 10 |
# Below is an example of a tool that does nothing. Amaze us with your creativity !
|
| 11 |
@tool
|
| 12 |
+
def countries_with_same_current_offset(timezone : str) -> str:
|
| 13 |
"""A tool that fetches a list of all countries that have the same current UTC offset as the given timezone_name.
|
| 14 |
Args:
|
| 15 |
timezone: A string representing a valid timezone (e.g., 'America/New_York').
|
|
|
|
| 29 |
ref_offset = now_utc.astimezone(ref_tz).utcoffset()
|
| 30 |
|
| 31 |
matching_countries = []
|
| 32 |
+
return_country_names = True
|
| 33 |
# Traverse all known countries in pytz
|
| 34 |
for country_code, timezones in pytz.country_timezones.items():
|
| 35 |
for tz_name in timezones:
|