Luis commited on
Commit
64a3d76
·
verified ·
1 Parent(s): 3d27001

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -19
app.py CHANGED
@@ -11,29 +11,16 @@ from Gradio_UI import GradioUI
11
 
12
  # Belo is an example of a tool that does nothing. Amaze us with your creativity !
13
  @tool
14
- def my_cutom_tool(arg1:str, arg2:int)-> str: #it's import to specify the return type
15
  #Keep this format for the description / args / args description but feel free to modify the tool
16
- """A tool that does nothing yet
17
  Args:
18
- arg1: the first argument
19
- arg2: the second argument
20
  """
21
- return "What magic will you build ?"
 
22
 
23
- @tool
24
- def get_current_time_in_timezone(timezone: str) -> str:
25
- """A tool that fetches the current local time in a specified timezone.
26
- Args:
27
- timezone: A string representing a valid timezone (e.g., 'America/New_York').
28
- """
29
- try:
30
- # Create timezone object
31
- tz = pytz.timezone(timezone)
32
- # Get current time in that timezone
33
- local_time = datetime.datetime.now(tz).strftime("%Y-%m-%d %H:%M:%S")
34
- return f"The current local time in {timezone} is: {local_time}"
35
- except Exception as e:
36
- return f"Error fetching time for timezone '{timezone}': {str(e)}"
37
 
38
 
39
  final_answer = FinalAnswerTool()
 
11
 
12
  # Belo is an example of a tool that does nothing. Amaze us with your creativity !
13
  @tool
14
+ def time_left_for_event(arg1:str, arg2:int)-> str: #it's import to specify the return type
15
  #Keep this format for the description / args / args description but feel free to modify the tool
16
+ """A tool that calculates the time left for a certain event, and returns in a very convenient way the time between today and that events date
17
  Args:
18
+ arg1: the event name
19
+ arg2: the day of that event in calendar time
20
  """
21
+
22
+ return "a string specifiyng the weeks, days, or months left to the event"
23
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
24
 
25
 
26
  final_answer = FinalAnswerTool()