testapi / app.py
Taf2023's picture
Upload app.py
b43fd15 verified
raw
history blame
460 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,
title='Random Word API',
description='Click "Generate" to get a random order of words.',
server_name="localhost")
iface.launch(share=True)