Spaces:
Sleeping
Sleeping
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() | |