Jerrycool commited on
Commit
43f4ea4
·
verified ·
1 Parent(s): ea79b7d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +34 -1
app.py CHANGED
@@ -446,7 +446,32 @@ citation_css = """
446
  }
447
  """
448
 
449
- final_css = f"{custom_css}\n{base_css}\n{intro_css}\n{markdown_css}\n{tab_css}\n{radio_css}\n{citation_css}"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
450
 
451
  # ---------------------------------------------------------------------------
452
  # Build the Gradio UI
@@ -505,6 +530,14 @@ with demo:
505
  with gr.Column():
506
  gr.Markdown(LLM_BENCHMARKS_TEXT, elem_classes="markdown-text")
507
 
 
 
 
 
 
 
 
 
508
  # Citation accordion (bottom of page)
509
  with gr.Accordion("📙 Citation", open=False, elem_classes="gradio-accordion"):
510
  gr.Textbox(
 
446
  }
447
  """
448
 
449
+ about_image_css = """
450
+ /* --- CSS for the Image in the About Tab --- */
451
+ #intro-image img { /* Target the actual <img> tag inside the Gradio component */
452
+ display: block; /* Treat the image as a block element */
453
+ max-width: 800px; /* Set a maximum width (adjust as needed) */
454
+ width: 90%; /* Make width responsive (e.g., 90% of its container) */
455
+ height: auto; /* Maintain aspect ratio */
456
+ margin-top: 2rem; /* Add space above the image */
457
+ margin-bottom: 1rem; /* Add space below the image */
458
+ margin-left: auto; /* Center the image horizontally */
459
+ margin-right: auto; /* Center the image horizontally */
460
+ border-radius: 8px; /* Optional: add rounded corners */
461
+ box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Optional: add a subtle shadow */
462
+ }
463
+
464
+ /* Optional: Different styles for smaller screens */
465
+ @media (max-width: 768px) {
466
+ #intro-image img {
467
+ max-width: 100%; /* Allow it to use full width on small screens */
468
+ width: 95%; /* Adjust percentage if needed */
469
+ margin-top: 1.5rem;
470
+ }
471
+ }
472
+ """
473
+
474
+ final_css = f"{custom_css}\n{base_css}\n{intro_css}\n{markdown_css}\n{tab_css}\n{radio_css}\n{citation_css}\n{about_image_css}"
475
 
476
  # ---------------------------------------------------------------------------
477
  # Build the Gradio UI
 
530
  with gr.Column():
531
  gr.Markdown(LLM_BENCHMARKS_TEXT, elem_classes="markdown-text")
532
 
533
+ # NEW ⭐: image immediately below the introduction
534
+ with gr.Row():
535
+ gr.Image(
536
+ value="overview.jpg",
537
+ show_label=False,
538
+ elem_id="intro-image",
539
+ )
540
+
541
  # Citation accordion (bottom of page)
542
  with gr.Accordion("📙 Citation", open=False, elem_classes="gradio-accordion"):
543
  gr.Textbox(