nikhilkomakula commited on
Commit
f6ca56d
·
verified ·
1 Parent(s): e2da55c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -10,7 +10,7 @@ from Gradio_UI import GradioUI
10
  # Below is an example of a tool that does nothing. Amaze us with your creativity !
11
 
12
  @tool
13
- def convert_time_only(time_str: str, from_tz_str: str, to_tz_str: str, fmt: str ="%H:%M") -> str:
14
  """A tool that converts a given time from a source timezone to a destination timezone using today's date.
15
 
16
  Args:
@@ -28,6 +28,8 @@ def convert_time_only(time_str: str, from_tz_str: str, to_tz_str: str, fmt: str
28
  from datetime import datetime, date
29
  import pytz
30
 
 
 
31
  # Use today's date with the provided time
32
  today = date.today()
33
  dt = datetime.strptime(time_str, fmt)
 
10
  # Below is an example of a tool that does nothing. Amaze us with your creativity !
11
 
12
  @tool
13
+ def convert_time_only(time_str: str, from_tz_str: str, to_tz_str: str) -> str:
14
  """A tool that converts a given time from a source timezone to a destination timezone using today's date.
15
 
16
  Args:
 
28
  from datetime import datetime, date
29
  import pytz
30
 
31
+ fmt: str = "%H:%M"
32
+
33
  # Use today's date with the provided time
34
  today = date.today()
35
  dt = datetime.strptime(time_str, fmt)