Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -23,7 +23,7 @@ def my_custom_tool(arg1:str, arg2:int)-> str: #it's import to specify the return
|
|
| 23 |
def coin_flip(guess:str)-> str:
|
| 24 |
"""A tool that plays a coin flip game and tells the user if they won or not based on their guess and result of the coin flip
|
| 25 |
Args:
|
| 26 |
-
guess: the guess from the user if the result of the coin flip will be heads or tails. No other choices are permitted
|
| 27 |
"""
|
| 28 |
result = random.randint(0, 1)
|
| 29 |
|
|
@@ -32,9 +32,9 @@ def coin_flip(guess:str)-> str:
|
|
| 32 |
else:
|
| 33 |
result = "Tails"
|
| 34 |
if result.lower() == guess.lower():
|
| 35 |
-
return f"{result}: You Win!
|
| 36 |
else:
|
| 37 |
-
return f"{result}: You Lost
|
| 38 |
|
| 39 |
@tool
|
| 40 |
def conversation_image(conversation:str, user:str, user_description:str)-> str:
|
|
|
|
| 23 |
def coin_flip(guess:str)-> str:
|
| 24 |
"""A tool that plays a coin flip game and tells the user if they won or not based on their guess and result of the coin flip
|
| 25 |
Args:
|
| 26 |
+
guess: the guess from the user if the result of the coin flip will be 'heads' or 'tails'. No other choices are permitted
|
| 27 |
"""
|
| 28 |
result = random.randint(0, 1)
|
| 29 |
|
|
|
|
| 32 |
else:
|
| 33 |
result = "Tails"
|
| 34 |
if result.lower() == guess.lower():
|
| 35 |
+
return f"{result}: You Win!"
|
| 36 |
else:
|
| 37 |
+
return f"{result}: You Lost."
|
| 38 |
|
| 39 |
@tool
|
| 40 |
def conversation_image(conversation:str, user:str, user_description:str)-> str:
|