AnwenHu ysharma HF staff commited on
Commit
8b737a6
1 Parent(s): fa3be65

adding a placeholder to chatbot (#2)

Browse files

- adding a placeholder to chatbot (23b06c61830a90b0f0c228ad0e43b0e4aaca8116)


Co-authored-by: yuvraj sharma <ysharma@users.noreply.huggingface.co>

Files changed (1) hide show
  1. app.py +8 -1
app.py CHANGED
@@ -261,6 +261,13 @@ block_css = """
261
 
262
  """
263
 
 
 
 
 
 
 
 
264
  def build_demo(embed_mode):
265
  textbox = gr.Textbox(show_label=False, placeholder="Enter text and press ENTER", container=False)
266
  with gr.Blocks(title="mPLUG-Owl2", theme=gr.themes.Default(), css=block_css) as demo:
@@ -294,7 +301,7 @@ def build_demo(embed_mode):
294
  max_output_tokens = gr.Slider(minimum=0, maximum=1024, value=512, step=64, interactive=True, label="Max output tokens",)
295
 
296
  with gr.Column(scale=8):
297
- chatbot = gr.Chatbot(elem_id="Chatbot", label="mPLUG-DocOwl1.5 Chatbot", height=600)
298
  with gr.Row():
299
  with gr.Column(scale=8):
300
  textbox.render()
 
261
 
262
  """
263
 
264
+ placeholder = """
265
+ <img src="https://raw.githubusercontent.com/X-PLUG/mPLUG-DocOwl/main/assets/mPLUG_new1.png" style="width:40%">
266
+
267
+ **mPLUG-DocOwl1.5: Unified Stucture Learning for OCR-free Document Understanding**
268
+
269
+ """
270
+
271
  def build_demo(embed_mode):
272
  textbox = gr.Textbox(show_label=False, placeholder="Enter text and press ENTER", container=False)
273
  with gr.Blocks(title="mPLUG-Owl2", theme=gr.themes.Default(), css=block_css) as demo:
 
301
  max_output_tokens = gr.Slider(minimum=0, maximum=1024, value=512, step=64, interactive=True, label="Max output tokens",)
302
 
303
  with gr.Column(scale=8):
304
+ chatbot = gr.Chatbot(elem_id="Chatbot", label="mPLUG-DocOwl1.5 Chatbot", height=600, placeholder=placeholder)
305
  with gr.Row():
306
  with gr.Column(scale=8):
307
  textbox.render()