Spaces:
Sleeping
Sleeping
Stoyan Georgiev
commited on
Commit
·
d3cfa61
1
Parent(s):
5fb5d0f
Updated the Space with new features
Browse files
app.py
CHANGED
@@ -24,8 +24,11 @@ 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 |
# Falls der Nutzer eine Stadt statt eines gültigen Zeitzonen-IDs angibt,
|
31 |
# können wir eine Mapping-Tabelle verwenden.
|
@@ -45,7 +48,7 @@ def get_current_time_in_timezone(timezone: str) -> str:
|
|
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,
|
|
|
24 |
"""
|
25 |
Returns the current local time for a given timezone.
|
26 |
|
27 |
+
Args:
|
28 |
+
timezone (str): The timezone string (e.g., 'Europe/Berlin', 'America/New_York').
|
29 |
+
|
30 |
+
Returns:
|
31 |
+
str: The current time as a string in the specified timezone.
|
32 |
"""
|
33 |
# Falls der Nutzer eine Stadt statt eines gültigen Zeitzonen-IDs angibt,
|
34 |
# können wir eine Mapping-Tabelle verwenden.
|
|
|
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,
|