testapi / app.py
Taf2023's picture
Update app.py
dd200eb verified
raw
history blame
486 Bytes
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,
inputs=None,
outputs="text",
title='Random Word API',
description='Click "Generate" to get a random order of words.')
iface.launch(share=True)