Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -43,24 +43,6 @@ def extract_lifespan(text: str) -> Optional[str]:
|
|
| 43 |
return None
|
| 44 |
|
| 45 |
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
@tool
|
| 49 |
-
def get_current_time_in_timezone(timezone: str) -> str:
|
| 50 |
-
"""A tool that fetches the current local time in a specified timezone.
|
| 51 |
-
Args:
|
| 52 |
-
timezone: A string representing a valid timezone (e.g., 'America/New_York').
|
| 53 |
-
"""
|
| 54 |
-
try:
|
| 55 |
-
# Create timezone object
|
| 56 |
-
tz = pytz.timezone(timezone)
|
| 57 |
-
# Get current time in that timezone
|
| 58 |
-
local_time = datetime.datetime.now(tz).strftime("%Y-%m-%d %H:%M:%S")
|
| 59 |
-
return f"The current local time in {timezone} is: {local_time}"
|
| 60 |
-
except Exception as e:
|
| 61 |
-
return f"Error fetching time for timezone '{timezone}': {str(e)}"
|
| 62 |
-
|
| 63 |
-
|
| 64 |
final_answer = FinalAnswerTool()
|
| 65 |
model = HfApiModel(
|
| 66 |
max_tokens=2096,
|
|
|
|
| 43 |
return None
|
| 44 |
|
| 45 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 46 |
final_answer = FinalAnswerTool()
|
| 47 |
model = HfApiModel(
|
| 48 |
max_tokens=2096,
|