Spaces:
Sleeping
Sleeping
fix: indentation + add parameters
Browse files
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 |
-
|
| 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 /
|
| 29 |
-
fairytales.pop(int(arg /
|
| 30 |
-
selected_2 = fairytales[random.randint(0,
|
| 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:
|