BenyaAronov commited on
Commit
d2f9211
·
verified ·
1 Parent(s): 3b43959

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -9,7 +9,7 @@ from Gradio_UI import GradioUI
9
 
10
  # Below is an example of a tool that does nothing. Amaze us with your creativity !
11
  @tool
12
- def my_local_name_generator(arg1: str, arg2: str) -> str:
13
  """A tool that generates a localized version of the given name for the specified country.
14
 
15
  Args:
@@ -50,9 +50,11 @@ def my_local_name_generator(arg1: str, arg2: str) -> str:
50
 
51
  except Exception as e:
52
  return f"An error occurred: {str(e)}"
 
 
53
 
54
  @tool
55
- def get_current_time_in_timezone(timezone: str) -> str:
56
  """A tool that fetches the current local time in a specified timezone.
57
  Args:
58
  timezone: A string representing a valid timezone (e.g., 'America/New_York').
@@ -67,6 +69,7 @@ def get_current_time_in_timezone(timezone: str) -> str:
67
  return f"Error fetching time for timezone '{timezone}': {str(e)}"
68
 
69
 
 
70
  final_answer = FinalAnswerTool()
71
 
72
  # If the agent does not answer, the model is overloaded, please use another model or the following Hugging Face Endpoint that also contains qwen2.5 coder:
 
9
 
10
  # Below is an example of a tool that does nothing. Amaze us with your creativity !
11
  @tool
12
+ def _my_local_name_generator(arg1: str, arg2: str) -> str:
13
  """A tool that generates a localized version of the given name for the specified country.
14
 
15
  Args:
 
50
 
51
  except Exception as e:
52
  return f"An error occurred: {str(e)}"
53
+
54
+ my_local_name_generator = _my_local_name_generator
55
 
56
  @tool
57
+ def _get_current_time_in_timezone(timezone: str) -> str:
58
  """A tool that fetches the current local time in a specified timezone.
59
  Args:
60
  timezone: A string representing a valid timezone (e.g., 'America/New_York').
 
69
  return f"Error fetching time for timezone '{timezone}': {str(e)}"
70
 
71
 
72
+ get_current_time_in_timezone = _get_current_time_in_timezone
73
  final_answer = FinalAnswerTool()
74
 
75
  # If the agent does not answer, the model is overloaded, please use another model or the following Hugging Face Endpoint that also contains qwen2.5 coder: