Spaces:
Sleeping
Sleeping
File size: 423 Bytes
d350b79 69f35c4 8ad1783 764949d 8ad1783 764949d 8ad1783 764949d 69f35c4 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
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()
|