File size: 432 Bytes
21617ff
 
 
 
 
8f1ab22
 
 
 
 
 
 
 
 
 
79005f2
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 demo:
    with gr.Row():
        with gr.Column():
            input_text = gr.Textbox(label="Input")
            submit_btn = gr.Button()
        with gr.Column():
            output_text = gr.Textbox(label="Output")
    
    submit_btn.click(fn=greet, inputs=[input_text], outputs=[output_text])

demo.launch(share=True, ssr_mode=False)