haubie commited on
Commit
7df98fb
·
verified ·
1 Parent(s): 0db8c37

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -6
app.py CHANGED
@@ -15,14 +15,16 @@ from Gradio_UI import GradioUI
15
 
16
  # Below is an example of a tool that does nothing. Amaze us with your creativity !
17
  @tool
18
- def my_custom_tool(arg1:str, arg2:int)-> str: #it's import to specify the return type
19
- #Keep this format for the description / args / args description but feel free to modify the tool
20
- """A tool that does nothing yet
21
  Args:
22
- arg1: the first argument
23
- arg2: the second argument
24
  """
25
- return "What magic will you build ?"
 
 
 
 
26
 
27
  @tool
28
  def get_current_time_in_timezone(timezone: str) -> str:
 
15
 
16
  # Below is an example of a tool that does nothing. Amaze us with your creativity !
17
  @tool
18
+ def get_translation(text:str)-> str:
19
+ """Translates English into Silly English.
 
20
  Args:
21
+ text: the text to translate
 
22
  """
23
+ drop_chars = ["a", "e", "i", "o", "u"]
24
+ table = str.maketrans("", "", "".join(drop_chars))
25
+ translation = text.translate(table)
26
+
27
+ return translation
28
 
29
  @tool
30
  def get_current_time_in_timezone(timezone: str) -> str: