Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,24 +1,18 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
import random
|
| 3 |
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
return
|
| 8 |
|
| 9 |
interface = gr.Interface(
|
| 10 |
generate_word,
|
| 11 |
-
inputs=
|
| 12 |
outputs="text",
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
inputs_type=["text", "text", "text"],
|
| 16 |
-
inputs_layout=["vertical"]*3,
|
| 17 |
-
examples=[
|
| 18 |
-
["lime", "gold", "navy"],
|
| 19 |
-
["olive", "lemon", "teal"]
|
| 20 |
-
],
|
| 21 |
-
description="Generate a random word with specified colors"
|
| 22 |
)
|
| 23 |
|
| 24 |
interface.launch()
|
|
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
import random
|
| 3 |
|
| 4 |
+
words = ['Byron', 'Crow', 'Fang', 'Grom', 'Gus', 'Sam', 'Buster', 'Mandy', 'ChesterLou', 'Bo', 'Edgar', 'Gene', 'Spike', 'Belle', 'Colonel Ruffs', 'Jessie', 'El Primo', 'Piper', 'Pam', 'Mortis', 'Tara', 'Max', 'Mr. P', 'Leon', 'Sandy', 'Amber', 'Gale', 'Surge', 'Squeak', 'Meg', 'Eve', 'Bonnie', 'Otis', 'Janet', 'GrayNita', 'Dynamike', 'Barley', 'Poco', 'Rosa', 'Rico', 'Brock', 'Tick', '8-Bit', 'Emz', 'Penny', 'Frank', 'Bea', 'Sprout', 'Colette', 'Buzz', 'Griff', 'LolaStu', 'Shelly', 'Colt', 'Bull', 'Darryl', 'Carl', 'Bibi', 'Nani', 'Jacky']
|
| 5 |
+
|
| 6 |
+
def generate_word():
|
| 7 |
+
return random.choice(words)
|
| 8 |
|
| 9 |
interface = gr.Interface(
|
| 10 |
generate_word,
|
| 11 |
+
inputs="button",
|
| 12 |
outputs="text",
|
| 13 |
+
title="Random Word Generator",
|
| 14 |
+
description="Generate a random word from a pre-defined list of options"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
)
|
| 16 |
|
| 17 |
interface.launch()
|
| 18 |
+
``
|