luke9705 commited on
Commit
2124418
·
verified ·
1 Parent(s): 6f6df70

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -5
app.py CHANGED
@@ -7,13 +7,18 @@ import os
7
  from Gradio_UI import GradioUI
8
  # Tools
9
  @tool
10
- def my_cutom_tool(arg1:str)-> str: #it's import to specify the return type
11
- """A tool that
12
  Args:
13
- arg1: the first argument
14
- arg2: the second argument
15
  """
16
- return "What magic will you build ?"
 
 
 
 
 
 
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: