File size: 300 Bytes
2af848d
 
 
 
 
 
 
cd57287
 
 
 
 
 
cb94bb2
 
cd57287
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import gradio as gr


def greet(name):
    return "Hello " + name + "!"


with gr.Blocks() as blocks:
    with gr.Row():
        text_in = gr.Text()
        text_out = gr.Text()
    btn = gr.Button("Run") 
    btn.click(fn=greet, inputs=text_in, outputs=text_out)
    
blocks.queue()
blocks.launch()