stkarlos commited on
Commit
107731e
·
verified ·
1 Parent(s): e59d72c

fix: indentation + add parameters

Browse files
Files changed (1) hide show
  1. app.py +4 -7
app.py CHANGED
@@ -16,7 +16,7 @@ def my_fairytale_tool(arg:int)-> str: #it's import to specify the return type
16
  arg: random number
17
  """
18
 
19
- fairytales = [
20
  "Cinderella",
21
  "Snow White",
22
  "Little Red Riding Hood",
@@ -25,14 +25,11 @@ def my_fairytale_tool(arg:int)-> str: #it's import to specify the return type
25
  ]
26
 
27
  # Randomly select fairytales from the list
28
- selected_1 = fairytales[int(arg / 5)]
29
- fairytales.pop(int(arg / 4))
30
- selected_2 = fairytales[random.randint(0,4)]
31
 
32
-
33
-
34
  return f"What a crazy idea to see a story of {selected_1} vs {selected_2}"
35
- #return "What magic will you build ?"
36
 
37
  @tool
38
  def get_current_time_in_timezone(timezone: str) -> str:
 
16
  arg: random number
17
  """
18
 
19
+ fairytales = [
20
  "Cinderella",
21
  "Snow White",
22
  "Little Red Riding Hood",
 
25
  ]
26
 
27
  # Randomly select fairytales from the list
28
+ selected_1 = fairytales[int(arg / len(fairytales))]
29
+ fairytales.pop(int(arg / len(fairytales)))
30
+ selected_2 = fairytales[random.randint(0,len(fairytales)-1)]
31
 
 
 
32
  return f"What a crazy idea to see a story of {selected_1} vs {selected_2}"
 
33
 
34
  @tool
35
  def get_current_time_in_timezone(timezone: str) -> str: