gulixin0922 commited on
Commit
8954310
1 Parent(s): 8582cb0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -11
app.py CHANGED
@@ -349,7 +349,7 @@ def http_bot(
349
 
350
 
351
  title_html = """
352
- <h2> <span class="gradient-text" id="text">InternVL2.5</span><span class="plain-text">: Better than the Best—Expanding Performance Boundaries of Open-Source Multimodal Models with the Progressive Scaling Strategy</span></h2>
353
  <a href="https://internvl.github.io/blog/2024-07-02-InternVL-2.0/">[📜 InternVL2 Blog]</a>
354
  <a href="https://internvl.opengvlab.com/">[🌟 Official Demo]</a>
355
  <a href="https://github.com/OpenGVLab/InternVL?tab=readme-ov-file#quick-start-with-huggingface">[🚀 Quick Start]</a>
@@ -422,7 +422,7 @@ function createWaveAnimation() {
422
  """
423
 
424
 
425
- def build_demo(embed_mode):
426
  textbox = gr.MultimodalTextbox(
427
  interactive=True,
428
  file_types=["image", "video"],
@@ -437,11 +437,10 @@ def build_demo(embed_mode):
437
  ) as demo:
438
  state = gr.State()
439
 
440
- if not embed_mode:
441
- gr.HTML(title_html)
442
-
443
  with gr.Row():
444
  with gr.Column(scale=2):
 
 
445
 
446
  with gr.Accordion("Settings", open=False) as setting_row:
447
  system_prompt = gr.Textbox(
@@ -494,9 +493,9 @@ def build_demo(embed_mode):
494
  [
495
  {
496
  "files": [
497
- "gallery/prod_9.jpg",
498
  ],
499
- "text": "What's at the far end of the image?",
500
  }
501
  ],
502
  [
@@ -504,7 +503,7 @@ def build_demo(embed_mode):
504
  "files": [
505
  "gallery/1-2.PNG",
506
  ],
507
- "text": "python实现这个流程图",
508
  }
509
  ],
510
  [
@@ -512,7 +511,7 @@ def build_demo(embed_mode):
512
  "files": [
513
  "gallery/15.PNG",
514
  ],
515
- "text": "请帮我分析一下这张图内容",
516
  }
517
  ],
518
  ],
@@ -632,12 +631,11 @@ if __name__ == "__main__":
632
  parser.add_argument("--concurrency-count", type=int, default=10)
633
  parser.add_argument("--share", action="store_true")
634
  parser.add_argument("--moderate", action="store_true")
635
- parser.add_argument("--embed", action="store_true")
636
  args = parser.parse_args()
637
  logger.info(f"args: {args}")
638
 
639
  logger.info(args)
640
- demo = build_demo(args.embed)
641
  demo.queue(api_open=False).launch(
642
  server_name=args.host,
643
  server_port=args.port,
 
349
 
350
 
351
  title_html = """
352
+ <img src="https://internvl.opengvlab.com/assets/logo-47b364d3.jpg" style="width: 280px; height: 70px;">
353
  <a href="https://internvl.github.io/blog/2024-07-02-InternVL-2.0/">[📜 InternVL2 Blog]</a>
354
  <a href="https://internvl.opengvlab.com/">[🌟 Official Demo]</a>
355
  <a href="https://github.com/OpenGVLab/InternVL?tab=readme-ov-file#quick-start-with-huggingface">[🚀 Quick Start]</a>
 
422
  """
423
 
424
 
425
+ def build_demo():
426
  textbox = gr.MultimodalTextbox(
427
  interactive=True,
428
  file_types=["image", "video"],
 
437
  ) as demo:
438
  state = gr.State()
439
 
 
 
 
440
  with gr.Row():
441
  with gr.Column(scale=2):
442
+ # gr.Image('./gallery/logo-47b364d3.jpg')
443
+ gr.HTML(title_html)
444
 
445
  with gr.Accordion("Settings", open=False) as setting_row:
446
  system_prompt = gr.Textbox(
 
493
  [
494
  {
495
  "files": [
496
+ "gallery/14.jfif",
497
  ],
498
+ "text": "Please help me analyze this picture.",
499
  }
500
  ],
501
  [
 
503
  "files": [
504
  "gallery/1-2.PNG",
505
  ],
506
+ "text": "Implement this flow chart using python",
507
  }
508
  ],
509
  [
 
511
  "files": [
512
  "gallery/15.PNG",
513
  ],
514
+ "text": "Please help me analyze this picture.",
515
  }
516
  ],
517
  ],
 
631
  parser.add_argument("--concurrency-count", type=int, default=10)
632
  parser.add_argument("--share", action="store_true")
633
  parser.add_argument("--moderate", action="store_true")
 
634
  args = parser.parse_args()
635
  logger.info(f"args: {args}")
636
 
637
  logger.info(args)
638
+ demo = build_demo()
639
  demo.queue(api_open=False).launch(
640
  server_name=args.host,
641
  server_port=args.port,