Gradio #
import gradio as gr
def greet(name):
return "Hello " + name + "!"
with gr.Blocks() as demo:
output = gr.Textbox(label="Output Box")
name = gr.Textbox(label="Name")
greet_btn = gr.Button("Greet")
greet_btn.click(fn=greet, inputs=name, outputs=output)
demo.launch(share=True, server_name="0.0.0.0", server_port=8722)
叶王 © 2013-2024 版权所有。如果本文档对你有所帮助,可以请作者喝饮料。