LuniLand commited on
Commit
4abb9e3
·
verified ·
1 Parent(s): 6201cbf

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -34,19 +34,19 @@ def get_current_time_in_timezone(timezone: str) -> str:
34
  return f"Error fetching time for timezone '{timezone}': {str(e)}"
35
 
36
  @tool
37
- def does_file_exist(file_name: str) -> bool:
38
  """
39
  A tool that checks if a file exists in the current directory.
40
  Args:
41
  file_name: a string representing the file name to find.
42
 
43
  Returns:
44
- bool: returns True if the file exists else returns False
45
  """
46
  try:
47
  from pathlib import Path
48
  file_path: Path = Path(f"./{file_name}")
49
- return file_path.exists()
50
  except Exception as e:
51
  return f"Error finding the file {file_name}: {str(e)}"
52
 
 
34
  return f"Error fetching time for timezone '{timezone}': {str(e)}"
35
 
36
  @tool
37
+ def does_file_exist(file_name: str) -> str:
38
  """
39
  A tool that checks if a file exists in the current directory.
40
  Args:
41
  file_name: a string representing the file name to find.
42
 
43
  Returns:
44
+ str: returns True if the file exists else returns error message
45
  """
46
  try:
47
  from pathlib import Path
48
  file_path: Path = Path(f"./{file_name}")
49
+ return f"Does the file {file_name} exists? {file_path.exists()}"
50
  except Exception as e:
51
  return f"Error finding the file {file_name}: {str(e)}"
52