gradio_demo / app.py
liampro
fix: 不支持share=True
e2dcc59
raw
history blame contribute delete
464 Bytes
import gradio as gr
def generate_mutimodal(title, context, img):
return f"Title:{title}\n Context: {context} \n {img} "
server = gr.Interface(
fn=generate_mutimodal,
inputs=[
gr.Textbox(lines=1, placeholder="请输入标题"),
gr.Textbox(lines=2, placeholder="请输入正文"),
gr.Image(shape=(200, 200), label="请上传图片(可选)")
],
outputs="text"
)
if __name__ == '__main__':
server.launch()
pass