mytest / app.py
aunghlaing's picture
Update app.py
31dc55d verified
raw
history blame contribute delete
432 Bytes
import gradio as gr
def greet(name):
return f"Hello, {name}!"
with gr.Blocks() as demo:
with gr.Row():
gr.Markdown("## Welcome to My Gradio App!")
with gr.Row():
name_input = gr.Textbox(label="Enter your name")
output = gr.Textbox(label="Greeting")
with gr.Row():
greet_button = gr.Button("Greet")
greet_button.click(greet, inputs=name_input, outputs=output)
demo.launch()