Commit ·
77fab30
1
Parent(s): 9ffd69a
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,9 +1,14 @@
|
|
| 1 |
from gradio import Interface
|
| 2 |
|
| 3 |
-
def
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
|
|
|
|
|
|
|
|
|
| 7 |
|
| 8 |
-
|
| 9 |
-
|
|
|
|
|
|
|
|
|
| 1 |
from gradio import Interface
|
| 2 |
|
| 3 |
+
def rainbow_game(color_choice):
|
| 4 |
+
rainbow_colors = ["red", "orange", "yellow", "green", "blue", "indigo", "violet"]
|
| 5 |
+
|
| 6 |
+
if color_choice.lower() in rainbow_colors:
|
| 7 |
+
response = f"Great choice, my love! {color_choice.capitalize()} is a beautiful color of the rainbow. Let's add it to our masterpiece!"
|
| 8 |
+
else:
|
| 9 |
+
response = "Oh, my dear Pedro, that's not a rainbow color. Please choose a color from the rainbow."
|
| 10 |
|
| 11 |
+
return response
|
| 12 |
+
|
| 13 |
+
iface = Interface(rainbow_game, "text", "text")
|
| 14 |
+
iface.launch()
|