Spaces:
Sleeping
Sleeping
Stoyan Georgiev commited on
Commit ·
5fb5d0f
1
Parent(s): e0c8b90
Updated the Space with new features
Browse files
app.py
CHANGED
|
@@ -24,11 +24,8 @@ def get_current_time_in_timezone(timezone: str) -> str:
|
|
| 24 |
"""
|
| 25 |
Returns the current local time for a given timezone.
|
| 26 |
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
Returns:
|
| 31 |
-
str: A string indicating the current time in the specified timezone or an error message.
|
| 32 |
"""
|
| 33 |
# Falls der Nutzer eine Stadt statt eines gültigen Zeitzonen-IDs angibt,
|
| 34 |
# können wir eine Mapping-Tabelle verwenden.
|
|
@@ -48,7 +45,7 @@ def get_current_time_in_timezone(timezone: str) -> str:
|
|
| 48 |
return f"The current local time in {timezone} is: {local_time}"
|
| 49 |
except Exception as e:
|
| 50 |
return f"Error fetching time for timezone '{timezone}': {str(e)}"
|
| 51 |
-
|
| 52 |
final_answer = FinalAnswerTool()
|
| 53 |
model = HfApiModel(
|
| 54 |
max_tokens=2096,
|
|
|
|
| 24 |
"""
|
| 25 |
Returns the current local time for a given timezone.
|
| 26 |
|
| 27 |
+
:param timezone: A valid timezone identifier (e.g. "America/New_York") or a recognized city alias.
|
| 28 |
+
:return: A string indicating the current time in the specified timezone or an error message.
|
|
|
|
|
|
|
|
|
|
| 29 |
"""
|
| 30 |
# Falls der Nutzer eine Stadt statt eines gültigen Zeitzonen-IDs angibt,
|
| 31 |
# können wir eine Mapping-Tabelle verwenden.
|
|
|
|
| 45 |
return f"The current local time in {timezone} is: {local_time}"
|
| 46 |
except Exception as e:
|
| 47 |
return f"Error fetching time for timezone '{timezone}': {str(e)}"
|
| 48 |
+
|
| 49 |
final_answer = FinalAnswerTool()
|
| 50 |
model = HfApiModel(
|
| 51 |
max_tokens=2096,
|