Spaces:
Build error
Build error
| import gradio as gr | |
| import random | |
| def generate_word(input_words): | |
| words = input_words.split(",") | |
| random_word = random.choice(words) | |
| return random_word | |
| input_box = gr.inputs.Textbox(label="Enter words separated by commas") | |
| output_text = gr.outputs.Textbox(label="Random word") | |
| interface = gr.Interface(fn=generate_word, inputs=input_box, outputs=output_text, title="Random Word Generator") | |
| interface.launch() | |