doctorsafe commited on
Commit
349107e
·
1 Parent(s): 98158e8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -0
app.py CHANGED
@@ -1 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
 
 
1
+ import gradio as gr
2
+
3
+ def generate_mutimodal(title, context, img):
4
+ return f"Title:{title}\nContext:{context}\n...{img}"
5
+
6
+ server = gr.Interface(
7
+ fn=generate_mutimodal,
8
+ inputs=[
9
+ gr.Textbox(lines=1, placeholder="请输入标题"),
10
+ gr.Textbox(lines=2, placeholder="请输入正文"),
11
+ gr.Image(shape=(200, 200), label="请上传图片(可选)")
12
+ ],
13
+ outputs="text"
14
+ )
15
+
16
+ server.launch()
17