Premkumar2025 commited on
Commit
795a366
·
verified ·
1 Parent(s): a610dd0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -15
app.py CHANGED
@@ -27,21 +27,6 @@ def calculate_age(birthdate: str) -> int:
27
  return age
28
  except Exception:
29
  return -1
30
- @tool
31
- def get_current_time_in_timezone(timezone: str) -> str:
32
- """A tool that fetches the current local time in a specified timezone.
33
- Args:
34
- timezone: A string representing a valid timezone (e.g., 'America/New_York').
35
- """
36
- try:
37
- # Create timezone object
38
- tz = pytz.timezone(timezone)
39
- # Get current time in that timezone
40
- local_time = datetime.datetime.now(tz).strftime("%Y-%m-%d %H:%M:%S")
41
- return f"The current local time in {timezone} is: {local_time}"
42
- except Exception as e:
43
- return f"Error fetching time for timezone '{timezone}': {str(e)}"
44
-
45
 
46
  final_answer = FinalAnswerTool()
47
  search_tool = DuckDuckGoSearchTool()
 
27
  return age
28
  except Exception:
29
  return -1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
30
 
31
  final_answer = FinalAnswerTool()
32
  search_tool = DuckDuckGoSearchTool()