File size: 498 Bytes
b43fd15 b57dcb0 b43fd15 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
import random
import gradio as gr
def randomize_words():
words = ['apple', 'banana', 'orange', 'grape', 'pear']
random.shuffle(words)
randomized_words = ' '.join(words)
return randomized_words
iface = gr.Interface(fn=randomize_words,
outputs="text",
title='Random Word API',
description='Click "Generate" to get a random order of words.',
server_name="localhost")
iface.launch(share=True)
|