Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -7,13 +7,18 @@ import os
|
|
7 |
from Gradio_UI import GradioUI
|
8 |
# Tools
|
9 |
@tool
|
10 |
-
def
|
11 |
-
"""A tool that
|
12 |
Args:
|
13 |
-
arg1: the
|
14 |
-
arg2: the second argument
|
15 |
"""
|
16 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
17 |
|
18 |
@tool
|
19 |
def get_current_time_in_timezone(timezone: str) -> str:
|
|
|
7 |
from Gradio_UI import GradioUI
|
8 |
# Tools
|
9 |
@tool
|
10 |
+
def to_uppercase(arg1:str)-> str: #it's import to specify the return type
|
11 |
+
"""A tool that converts a sentence to uppercase alternatively.
|
12 |
Args:
|
13 |
+
arg1: the sentence to be converted to uppercase
|
|
|
14 |
"""
|
15 |
+
i = 0
|
16 |
+
for text in arg1:
|
17 |
+
if i % 2 == 0:
|
18 |
+
text.upper()
|
19 |
+
i += 1
|
20 |
+
output = output + text
|
21 |
+
return output
|
22 |
|
23 |
@tool
|
24 |
def get_current_time_in_timezone(timezone: str) -> str:
|