Spaces:
Build error
Build error
Update app.py
Browse files123456745678910111112131415161718192021131415161718import gradio as grimport random
def generate_word(green, yellow, blue): colors = [green, yellow, blue] random.shuffle(colors) return "".join(colors)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']
def generate_word(): return random.choice(words)
interface = gr.Interface( generate_word, inputs=["text", "text", "text"], inputs="button", outputs="text", inputs_label=["Green", "Yellow", "Blue"], inputs_default=["green", "yellow", "blue"], inputs_type=["text", "text", "text"], inputs_layout=["vertical"]*3, examples=[ ["lime", "gold", "navy"], ["olive", "lemon", "teal"] ], description="Generate a random word with specified colors" title="Random Word Generator", description="Generate a random word from a pre-defined list of options")
interface.launch()``app.py+8-14