test001 / main.py
shouqiangli's picture
test001
04dd1b8
raw
history blame
691 Bytes
# import gradio as gr
# from gradio import components as grcomp
#
# def greet(name):
# return f"Hello, {name}!"
#
# input_text = grcomp.Textbox(lines=1, label="输入姓名")
# output_text = grcomp.Textbox(label="问候")
#
# iface = gr.Interface(fn=greet, inputs=input_text, outputs=output_text, title="问候程序")
# iface.launch(share=True)
import gradio as gr
from gradio import components as grcomp
def greet(name):
return f"Hello ,{name}!"
input_text = grcomp.Textbox(lines=1,label="输入姓名")
output_text = grcomp.Textbox(lines=1,label="问候")
iface = gr.Interface(fn=greet, inputs=input_text,outputs=output_text,title="问候程序")
iface.launch(share=True)