Update app.py
Browse files
app.py
CHANGED
@@ -42,21 +42,6 @@ def analyze_code(code: str, language: str) -> str:
|
|
42 |
|
43 |
return "Code analysis completed."
|
44 |
|
45 |
-
@tool
|
46 |
-
def get_current_time_in_timezone(timezone: str) -> str:
|
47 |
-
"""A tool that fetches the current local time in a specified timezone.
|
48 |
-
Args:
|
49 |
-
timezone: A string representing a valid timezone (e.g., 'America/New_York').
|
50 |
-
"""
|
51 |
-
try:
|
52 |
-
# Create timezone object
|
53 |
-
tz = pytz.timezone(timezone)
|
54 |
-
# Get current time in that timezone
|
55 |
-
local_time = datetime.datetime.now(tz).strftime("%Y-%m-%d %H:%M:%S")
|
56 |
-
return f"The current local time in {timezone} is: {local_time}"
|
57 |
-
except Exception as e:
|
58 |
-
return f"Error fetching time for timezone '{timezone}': {str(e)}"
|
59 |
-
|
60 |
|
61 |
final_answer = FinalAnswerTool()
|
62 |
|
|
|
42 |
|
43 |
return "Code analysis completed."
|
44 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
45 |
|
46 |
final_answer = FinalAnswerTool()
|
47 |
|