huiiz's picture
Duplicate from radames/nginx-gradio-reverse-proxy
c4bcc62
raw
history blame contribute delete
300 Bytes
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()