PawanKrGunjan commited on
Commit
5e9c8f5
·
verified ·
1 Parent(s): 2245cdd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +17 -4
app.py CHANGED
@@ -17,17 +17,30 @@ from Gradio_UI import GradioUI
17
  # ------------------ TOOLS ------------------ #
18
  @tool
19
  def my_custom_tool(arg1: str, arg2: int) -> str:
20
- """A tool that does nothing yet
 
 
21
  Args:
22
- arg1: the first argument
23
- arg2: the second argument
 
 
 
24
  """
25
  return f"Received {arg1} and {arg2}"
26
 
27
 
28
  @tool
29
  def get_current_time_in_timezone(timezone: str) -> str:
30
- """Fetch current time in a timezone"""
 
 
 
 
 
 
 
 
31
  try:
32
  tz = pytz.timezone(timezone)
33
  local_time = datetime.datetime.now(tz).strftime("%Y-%m-%d %H:%M:%S")
 
17
  # ------------------ TOOLS ------------------ #
18
  @tool
19
  def my_custom_tool(arg1: str, arg2: int) -> str:
20
+ """
21
+ A simple example tool.
22
+
23
  Args:
24
+ arg1: A string input.
25
+ arg2: An integer input.
26
+
27
+ Returns:
28
+ A formatted string response.
29
  """
30
  return f"Received {arg1} and {arg2}"
31
 
32
 
33
  @tool
34
  def get_current_time_in_timezone(timezone: str) -> str:
35
+ """
36
+ Get the current local time for a given timezone.
37
+
38
+ Args:
39
+ timezone: The timezone name (e.g., 'Asia/Kolkata', 'America/New_York').
40
+
41
+ Returns:
42
+ The current local time as a formatted string.
43
+ """
44
  try:
45
  tz = pytz.timezone(timezone)
46
  local_time = datetime.datetime.now(tz).strftime("%Y-%m-%d %H:%M:%S")