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)