petkar commited on
Commit
ebc76ca
·
verified ·
1 Parent(s): 734b741

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -0
app.py CHANGED
@@ -33,6 +33,9 @@ model = HfApiModel(
33
  def my_custom_tool(city1: str, city2: str) -> str:
34
  """
35
  A tool that searches for the top 5 sightseeing locations in two cities.
 
 
 
36
  """
37
  # Query the search model as plain text
38
  text_city1 = search_model(f"List the top 5 sightseeing locations in {city1}")
@@ -52,6 +55,11 @@ def my_custom_tool(city1: str, city2: str) -> str:
52
 
53
  @tool
54
  def get_current_time_in_timezone(timezone: str) -> str:
 
 
 
 
 
55
  try:
56
  tz = pytz.timezone(timezone)
57
  local_time = datetime.datetime.now(tz).strftime("%Y-%m-%d %H:%M:%S")
 
33
  def my_custom_tool(city1: str, city2: str) -> str:
34
  """
35
  A tool that searches for the top 5 sightseeing locations in two cities.
36
+ Args:
37
+ city1: the name of the first city
38
+ city2: the name of the second city
39
  """
40
  # Query the search model as plain text
41
  text_city1 = search_model(f"List the top 5 sightseeing locations in {city1}")
 
55
 
56
  @tool
57
  def get_current_time_in_timezone(timezone: str) -> str:
58
+
59
+ """A tool that fetches the current local time in a specified timezone.
60
+ Args:
61
+ timezone: A string representing a valid timezone (e.g., 'America/New_York').
62
+ """
63
  try:
64
  tz = pytz.timezone(timezone)
65
  local_time = datetime.datetime.now(tz).strftime("%Y-%m-%d %H:%M:%S")