Dongxu Li commited on
Commit
6f077c8
1 Parent(s): f6fc05a

update ui.

Browse files
Files changed (1) hide show
  1. app.py +6 -3
app.py CHANGED
@@ -126,9 +126,12 @@ def inference_caption(
126
 
127
 
128
  title = """<h1 align="center">BLIP-2</h1>"""
129
- description = """Gradio demo for BLIP-2, image-to-text generation from Salesforce Research. To use it, simply upload your image, or click one of the examples to load them. Please visit our <a href='https://github.com/salesforce/LAVIS/tree/main/projects/blip2' target='_blank'>project webpage</a>.</p>
130
  <p> <strong>Disclaimer</strong>: This is a research prototype and is not intended for production use. No data including but not restricted to text and images is collected. </p>"""
131
- article = "<p style='text-align: center'><a href='https://arxiv.org/abs/2301.12597' target='_blank'>BLIP-2: Bootstrapping Language-Image Pre-training with Frozen Image Encoders and Large Language Models</a>"
 
 
 
132
 
133
  endpoint = Endpoint()
134
 
@@ -204,7 +207,7 @@ with gr.Blocks() as iface:
204
  )
205
 
206
  with gr.Column():
207
- chat_input = gr.Textbox(lines=1, label="Chat Input")
208
  with gr.Row():
209
  chatbot = gr.Chatbot(label="Chat Output (from FlanT5)")
210
  image_input.change(lambda: (None, "", "", []), [], [chatbot, chat_input, caption_output, state])
 
126
 
127
 
128
  title = """<h1 align="center">BLIP-2</h1>"""
129
+ description = """Gradio demo for BLIP-2, image-to-text generation from Salesforce Research. To use it, simply upload your image, or click one of the examples to load them.</p>
130
  <p> <strong>Disclaimer</strong>: This is a research prototype and is not intended for production use. No data including but not restricted to text and images is collected. </p>"""
131
+ article = """<strong>Paper</strong>: <a href='https://arxiv.org/abs/2301.12597' target='_blank'>BLIP-2: Bootstrapping Language-Image Pre-training with Frozen Image Encoders and Large Language Models</a>
132
+ <br> <strong>Code</strong>: BLIP2 is now integrated into GitHub repo: <a href='https://github.com/salesforce/LAVIS' target='_blank'>LAVIS: a One-stop Library for Language and Vision</a>
133
+ <br> <strong>Project Page</strong>: <a href='https://github.com/salesforce/LAVIS/tree/main/projects/blip2' target='_blank'> BLIP2 on LAVIS</a>
134
+ """
135
 
136
  endpoint = Endpoint()
137
 
 
207
  )
208
 
209
  with gr.Column():
210
+ chat_input = gr.Textbox(lines=1, label="Chat Input (recommend prompt for QA, Question: {} Answer:)")
211
  with gr.Row():
212
  chatbot = gr.Chatbot(label="Chat Output (from FlanT5)")
213
  image_input.change(lambda: (None, "", "", []), [], [chatbot, chat_input, caption_output, state])