Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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
|
| 19 |
-
|
| 20 |
-
"""A tool that does nothing yet
|
| 21 |
Args:
|
| 22 |
-
|
| 23 |
-
arg2: the second argument
|
| 24 |
"""
|
| 25 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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:
|