Spaces:
Sleeping
Sleeping
File size: 303 Bytes
9cc9c3d ed0057b b1e34d6 |
1 2 3 4 5 6 7 8 9 10 11 12 |
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() |