Spaces:
Sleeping
Sleeping
import gradio as gr | |
def greet(name): | |
return "Hello " + name + "!" | |
with gr.Blocks() as demo: | |
output = gr.Textbox(label="输出") | |
name = gr.Textbox(label="输入") | |
greet_btn = gr.Button("提交") | |
greet_btn.click(fn=greet, inputs=name, outputs=output, api_name="greet") | |
demo.launch() |