File size: 437 Bytes
b2e582c 587bf4b ddde779 587bf4b bd1d30b |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
import gradio as gr
def update(name):
return f"Welcome to Gradio, {name}!"
with gr.Blocks() as demo:
gr.Markdown("Start typing below and then click **Run** to see the output.")
with gr.Row():
inp = gr.Textbox(placeholder="What is your name?")
out = gr.Textbox()
btn = gr.Button("Run")
btn.click(fn=update, inputs=inp, outputs=out, api_name="hello")
demo.launch()
#demo.launch(auth=("admin", "1234")) |