File size: 460 Bytes
b43fd15
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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)