Spaces:
Running
Running
Minette Kaunismäki commited on
Commit ·
1bf1b48
1
Parent(s): baa43b9
light and dark mode
Browse files
app.py
CHANGED
|
@@ -23,11 +23,13 @@ from ui import (
|
|
| 23 |
|
| 24 |
# Visual tokens from https://www.pruna.ai/ and https://playground.pruna.ai/
|
| 25 |
custom_css = """
|
| 26 |
-
:root {
|
| 27 |
--pruna-bg-primary: #120b1b;
|
| 28 |
--pruna-bg-card: #171021;
|
| 29 |
--pruna-bg-elevated: #1d1429;
|
|
|
|
| 30 |
--pruna-border: rgba(74, 57, 98, 0.75);
|
|
|
|
| 31 |
--pruna-text-primary: #fafafa;
|
| 32 |
--pruna-text-body: #d4d4d4;
|
| 33 |
--pruna-text-muted: #a3a3a3;
|
|
@@ -36,6 +38,76 @@ custom_css = """
|
|
| 36 |
--pruna-lavender: #d8b4fe;
|
| 37 |
--pruna-link: #bf8bff;
|
| 38 |
--pruna-font: "Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 39 |
}
|
| 40 |
|
| 41 |
html, body, .gradio-container, .main {
|
|
@@ -46,8 +118,7 @@ html, body, .gradio-container, .main {
|
|
| 46 |
|
| 47 |
/* Subtle depth — not a marketing-site hero glow */
|
| 48 |
body, .gradio-container {
|
| 49 |
-
background-image:
|
| 50 |
-
radial-gradient(ellipse 60% 35% at 50% -5%, rgba(147, 52, 233, 0.18), transparent 55%) !important;
|
| 51 |
background-attachment: fixed !important;
|
| 52 |
}
|
| 53 |
|
|
@@ -75,14 +146,74 @@ body, .gradio-container {
|
|
| 75 |
overflow: visible !important;
|
| 76 |
}
|
| 77 |
.app-header {
|
|
|
|
| 78 |
display: flex;
|
| 79 |
flex-direction: column;
|
| 80 |
align-items: center;
|
| 81 |
width: 100%;
|
| 82 |
margin: 8px 0 16px;
|
| 83 |
-
padding: 8px
|
| 84 |
text-align: center;
|
| 85 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 86 |
.app-header-brand {
|
| 87 |
display: inline-flex !important;
|
| 88 |
flex-direction: row;
|
|
@@ -120,7 +251,7 @@ body, .gradio-container {
|
|
| 120 |
gap: 2px;
|
| 121 |
}
|
| 122 |
.main-tabs .tab-container::after {
|
| 123 |
-
background:
|
| 124 |
}
|
| 125 |
.main-tabs .tab-container > button {
|
| 126 |
font-family: var(--pruna-font) !important;
|
|
@@ -137,12 +268,12 @@ body, .gradio-container {
|
|
| 137 |
height: auto !important;
|
| 138 |
}
|
| 139 |
.main-tabs .tab-container > button:hover:not(.selected) {
|
| 140 |
-
color:
|
| 141 |
background: transparent !important;
|
| 142 |
}
|
| 143 |
.main-tabs .tab-container > button.selected,
|
| 144 |
.main-tabs .tab-container > button[aria-selected="true"] {
|
| 145 |
-
color:
|
| 146 |
background: transparent !important;
|
| 147 |
}
|
| 148 |
.main-tabs .tab-container > button.selected::after,
|
|
@@ -211,9 +342,9 @@ body, .gradio-container {
|
|
| 211 |
gap: 4px !important;
|
| 212 |
width: 100%;
|
| 213 |
padding: 4px !important;
|
| 214 |
-
border: 1px solid
|
| 215 |
border-radius: 12px !important;
|
| 216 |
-
background:
|
| 217 |
}
|
| 218 |
.benchmark-view-menu label {
|
| 219 |
display: flex !important;
|
|
@@ -233,12 +364,12 @@ body, .gradio-container {
|
|
| 233 |
cursor: pointer;
|
| 234 |
}
|
| 235 |
.benchmark-view-menu label:hover {
|
| 236 |
-
color:
|
| 237 |
-
background:
|
| 238 |
}
|
| 239 |
.benchmark-view-menu label.selected {
|
| 240 |
-
color:
|
| 241 |
-
background:
|
| 242 |
}
|
| 243 |
.benchmark-view-menu input[type="radio"] {
|
| 244 |
position: absolute !important;
|
|
@@ -279,8 +410,8 @@ body, .gradio-container {
|
|
| 279 |
padding: 18px 20px !important;
|
| 280 |
border: 1px solid var(--pruna-border) !important;
|
| 281 |
border-radius: 16px !important;
|
| 282 |
-
background:
|
| 283 |
-
box-shadow:
|
| 284 |
}
|
| 285 |
.benchmark-card-col:hover {
|
| 286 |
border-color: color-mix(in srgb, var(--pruna-accent) 50%, transparent) !important;
|
|
@@ -313,8 +444,8 @@ body, .gradio-container {
|
|
| 313 |
.compare-prompt-block {
|
| 314 |
border: 1px solid var(--pruna-border) !important;
|
| 315 |
border-radius: 16px !important;
|
| 316 |
-
background:
|
| 317 |
-
box-shadow:
|
| 318 |
}
|
| 319 |
|
| 320 |
/* Page footer — flat community strip + quiet citation accordion */
|
|
@@ -335,7 +466,7 @@ body, .gradio-container {
|
|
| 335 |
.page-footer {
|
| 336 |
margin: 32px 0 16px;
|
| 337 |
padding: 20px 0 0;
|
| 338 |
-
border-top: 1px solid
|
| 339 |
}
|
| 340 |
.page-footer h3 {
|
| 341 |
margin: 0 0 10px !important;
|
|
@@ -343,7 +474,7 @@ body, .gradio-container {
|
|
| 343 |
font-weight: 600 !important;
|
| 344 |
letter-spacing: -0.015em !important;
|
| 345 |
text-transform: none !important;
|
| 346 |
-
color:
|
| 347 |
}
|
| 348 |
.community-footer-links {
|
| 349 |
display: flex;
|
|
@@ -367,9 +498,9 @@ body, .gradio-container {
|
|
| 367 |
}
|
| 368 |
.citation-accordion,
|
| 369 |
.citation-accordion.block {
|
| 370 |
-
border: 1px solid
|
| 371 |
border-radius: 10px !important;
|
| 372 |
-
background:
|
| 373 |
box-shadow: none !important;
|
| 374 |
overflow: hidden !important;
|
| 375 |
}
|
|
@@ -381,16 +512,16 @@ body, .gradio-container {
|
|
| 381 |
padding: 11px 14px !important;
|
| 382 |
font-size: 0.92rem !important;
|
| 383 |
font-weight: 500 !important;
|
| 384 |
-
color:
|
| 385 |
letter-spacing: -0.01em !important;
|
| 386 |
}
|
| 387 |
.citation-accordion > .label-wrap:hover,
|
| 388 |
.citation-accordion .label-wrap:hover {
|
| 389 |
-
background:
|
| 390 |
}
|
| 391 |
.citation-accordion > .label-wrap span,
|
| 392 |
.citation-accordion .label-wrap span {
|
| 393 |
-
color:
|
| 394 |
font-size: 0.92rem !important;
|
| 395 |
font-weight: 500 !important;
|
| 396 |
}
|
|
@@ -410,7 +541,7 @@ body, .gradio-container {
|
|
| 410 |
}
|
| 411 |
.citation-accordion .wrap,
|
| 412 |
.citation-accordion > .wrap {
|
| 413 |
-
border-top: 1px solid
|
| 414 |
padding: 4px 14px 12px !important;
|
| 415 |
background: transparent !important;
|
| 416 |
}
|
|
@@ -454,7 +585,7 @@ body, .gradio-container {
|
|
| 454 |
}
|
| 455 |
.home-callouts > div {
|
| 456 |
padding: 14px 16px;
|
| 457 |
-
background:
|
| 458 |
box-shadow: none !important;
|
| 459 |
}
|
| 460 |
.home-callouts span {
|
|
@@ -522,7 +653,7 @@ body, .gradio-container {
|
|
| 522 |
font-weight: 600 !important;
|
| 523 |
letter-spacing: -0.01em;
|
| 524 |
line-height: 1.3 !important;
|
| 525 |
-
color:
|
| 526 |
}
|
| 527 |
.home-snap-emoji {
|
| 528 |
display: inline-flex;
|
|
@@ -545,7 +676,7 @@ body, .gradio-container {
|
|
| 545 |
}
|
| 546 |
.home-snap-top {
|
| 547 |
padding-top: 10px;
|
| 548 |
-
border-top: 1px solid
|
| 549 |
width: 100%;
|
| 550 |
}
|
| 551 |
.home-top-label {
|
|
@@ -563,7 +694,7 @@ body, .gradio-container {
|
|
| 563 |
gap: 10px;
|
| 564 |
align-items: center;
|
| 565 |
padding: 8px 0;
|
| 566 |
-
border-bottom: 1px solid
|
| 567 |
color: var(--pruna-text-primary) !important;
|
| 568 |
}
|
| 569 |
@media (max-width: 700px) {
|
|
@@ -592,14 +723,14 @@ body, .gradio-container {
|
|
| 592 |
width: 28px;
|
| 593 |
height: 28px;
|
| 594 |
border-radius: 999px;
|
| 595 |
-
background:
|
| 596 |
color: var(--pruna-lavender) !important;
|
| 597 |
font-weight: 700;
|
| 598 |
font-size: 13px;
|
| 599 |
display: inline-flex;
|
| 600 |
align-items: center;
|
| 601 |
justify-content: center;
|
| 602 |
-
box-shadow:
|
| 603 |
}
|
| 604 |
.home-model,
|
| 605 |
.prose .home-model {
|
|
@@ -610,7 +741,7 @@ body, .gradio-container {
|
|
| 610 |
.home-score,
|
| 611 |
.prose .home-score {
|
| 612 |
font-variant-numeric: tabular-nums;
|
| 613 |
-
color:
|
| 614 |
font-weight: 600;
|
| 615 |
}
|
| 616 |
.home-empty,
|
|
@@ -650,7 +781,7 @@ body, .gradio-container {
|
|
| 650 |
.leaderboard-search label,
|
| 651 |
.leaderboard-search .block-label,
|
| 652 |
.leaderboard-search .block-label span {
|
| 653 |
-
color:
|
| 654 |
font-size: 0.85rem !important;
|
| 655 |
font-weight: 700 !important;
|
| 656 |
letter-spacing: -0.01em !important;
|
|
@@ -661,9 +792,9 @@ body, .gradio-container {
|
|
| 661 |
min-height: 40px !important;
|
| 662 |
height: 40px !important;
|
| 663 |
padding: 0 12px !important;
|
| 664 |
-
border: 1px solid
|
| 665 |
border-radius: 10px !important;
|
| 666 |
-
background:
|
| 667 |
box-shadow: none !important;
|
| 668 |
color: var(--pruna-text-primary) !important;
|
| 669 |
font-family: var(--pruna-font) !important;
|
|
@@ -682,17 +813,17 @@ body, .gradio-container {
|
|
| 682 |
.leaderboard-search input:focus,
|
| 683 |
.leaderboard-controls input:focus,
|
| 684 |
.leaderboard-controls textarea:focus {
|
| 685 |
-
border-color:
|
| 686 |
outline: none !important;
|
| 687 |
-
box-shadow:
|
| 688 |
}
|
| 689 |
.leaderboard-controls .wrap,
|
| 690 |
.leaderboard-controls .wrap-inner,
|
| 691 |
.leaderboard-controls .secondary-wrap {
|
| 692 |
min-height: 40px !important;
|
| 693 |
-
border: 1px solid
|
| 694 |
border-radius: 10px !important;
|
| 695 |
-
background:
|
| 696 |
box-shadow: none !important;
|
| 697 |
}
|
| 698 |
.ranking-table-host,
|
|
@@ -711,9 +842,9 @@ body, .gradio-container {
|
|
| 711 |
--block-border-width: 0 !important;
|
| 712 |
}
|
| 713 |
.ranking-table-scroll {
|
| 714 |
-
border: 1px solid
|
| 715 |
border-radius: 12px;
|
| 716 |
-
background:
|
| 717 |
box-shadow: none;
|
| 718 |
max-height: min(70vh, 720px);
|
| 719 |
overflow: auto;
|
|
@@ -752,7 +883,7 @@ body, .gradio-container {
|
|
| 752 |
vertical-align: middle !important;
|
| 753 |
padding: 11px 14px !important;
|
| 754 |
border: 0 !important;
|
| 755 |
-
border-bottom: 1px solid
|
| 756 |
background: transparent !important;
|
| 757 |
box-shadow: none !important;
|
| 758 |
outline: none !important;
|
|
@@ -762,7 +893,7 @@ body, .gradio-container {
|
|
| 762 |
position: sticky;
|
| 763 |
top: 0;
|
| 764 |
z-index: 3;
|
| 765 |
-
background:
|
| 766 |
color: var(--pruna-text-muted) !important;
|
| 767 |
font-size: 11px !important;
|
| 768 |
font-weight: 600 !important;
|
|
@@ -770,7 +901,7 @@ body, .gradio-container {
|
|
| 770 |
text-align: left;
|
| 771 |
text-transform: uppercase;
|
| 772 |
white-space: nowrap;
|
| 773 |
-
box-shadow: 0 1px 0
|
| 774 |
}
|
| 775 |
.ranking-table th.sortable-col { cursor: pointer; user-select: none; }
|
| 776 |
.ranking-table th.sortable-col:hover { color: var(--pruna-lavender) !important; }
|
|
@@ -784,14 +915,14 @@ body, .gradio-container {
|
|
| 784 |
.ranking-table th.sortable-col.sorted-desc::after { content: "▼"; }
|
| 785 |
.ranking-table tbody tr:last-child td { border-bottom: 0 !important; }
|
| 786 |
.ranking-table tbody tr:hover td {
|
| 787 |
-
background:
|
| 788 |
}
|
| 789 |
.ranking-table tbody tr:hover td,
|
| 790 |
.ranking-table tbody tr:hover .rank,
|
| 791 |
.ranking-table tbody tr:hover .metric-score,
|
| 792 |
.ranking-table tbody tr:hover .text-cell,
|
| 793 |
.ranking-table tbody tr:hover .model-cell strong,
|
| 794 |
-
.ranking-table tbody tr:hover .model-cell span { color:
|
| 795 |
.ranking-table .rank,
|
| 796 |
.prose .ranking-table .rank {
|
| 797 |
position: sticky;
|
|
@@ -803,7 +934,7 @@ body, .gradio-container {
|
|
| 803 |
color: var(--pruna-lavender) !important;
|
| 804 |
font-weight: 700 !important;
|
| 805 |
text-align: center;
|
| 806 |
-
background:
|
| 807 |
}
|
| 808 |
.ranking-table th.rank,
|
| 809 |
.prose .ranking-table th.rank {
|
|
@@ -811,6 +942,7 @@ body, .gradio-container {
|
|
| 811 |
left: 0;
|
| 812 |
z-index: 5;
|
| 813 |
text-align: center;
|
|
|
|
| 814 |
}
|
| 815 |
.ranking-table .model-cell,
|
| 816 |
.prose .ranking-table .model-cell {
|
|
@@ -819,17 +951,18 @@ body, .gradio-container {
|
|
| 819 |
z-index: 1;
|
| 820 |
min-width: 180px;
|
| 821 |
max-width: 260px;
|
| 822 |
-
background:
|
| 823 |
}
|
| 824 |
.ranking-table th.model-cell,
|
| 825 |
.prose .ranking-table th.model-cell {
|
| 826 |
top: 0;
|
| 827 |
left: 3.25rem;
|
| 828 |
z-index: 5;
|
|
|
|
| 829 |
}
|
| 830 |
.ranking-table tbody tr:hover .rank,
|
| 831 |
.ranking-table tbody tr:hover .model-cell {
|
| 832 |
-
background:
|
| 833 |
}
|
| 834 |
.ranking-table .model-cell strong,
|
| 835 |
.ranking-table .model-cell span { display: block; }
|
|
@@ -867,10 +1000,131 @@ body, .gradio-container {
|
|
| 867 |
}
|
| 868 |
|
| 869 |
.compare-samples-help { color: var(--pruna-text-body); margin-bottom: 8px; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 870 |
.compare-prompt-block {
|
| 871 |
margin: 0 0 22px;
|
| 872 |
padding: 14px 16px;
|
| 873 |
-
background:
|
| 874 |
}
|
| 875 |
.compare-prompt-meta {
|
| 876 |
display: flex;
|
|
@@ -904,7 +1158,7 @@ body, .gradio-container {
|
|
| 904 |
aspect-ratio: 1 / 1;
|
| 905 |
object-fit: cover;
|
| 906 |
border-radius: 12px;
|
| 907 |
-
border: 1px solid
|
| 908 |
background: var(--pruna-bg-elevated);
|
| 909 |
}
|
| 910 |
.compare-empty {
|
|
@@ -935,7 +1189,7 @@ body, .gradio-container {
|
|
| 935 |
font-weight: 700 !important;
|
| 936 |
letter-spacing: -0.035em;
|
| 937 |
line-height: 1 !important;
|
| 938 |
-
color:
|
| 939 |
}
|
| 940 |
.app-header-tagline,
|
| 941 |
.prose .app-header-tagline,
|
|
@@ -956,7 +1210,7 @@ body, .gradio-container {
|
|
| 956 |
.markdown h1, .md h1, .prose h1 {
|
| 957 |
margin: 0 0 0.65rem !important;
|
| 958 |
padding: 0 !important;
|
| 959 |
-
color:
|
| 960 |
font-family: var(--pruna-font) !important;
|
| 961 |
font-size: 1.5rem !important;
|
| 962 |
font-weight: 700 !important;
|
|
@@ -968,7 +1222,7 @@ body, .gradio-container {
|
|
| 968 |
.markdown h2, .md h2, .prose h2 {
|
| 969 |
margin: 1.75rem 0 0.75rem !important;
|
| 970 |
padding: 0 !important;
|
| 971 |
-
color:
|
| 972 |
font-family: var(--pruna-font) !important;
|
| 973 |
font-size: 1.25rem !important;
|
| 974 |
font-weight: 600 !important;
|
|
@@ -980,7 +1234,7 @@ body, .gradio-container {
|
|
| 980 |
.markdown h3, .md h3, .prose h3 {
|
| 981 |
margin: 1.35rem 0 0.5rem !important;
|
| 982 |
padding: 0 !important;
|
| 983 |
-
color:
|
| 984 |
font-family: var(--pruna-font) !important;
|
| 985 |
font-size: 1.05rem !important;
|
| 986 |
font-weight: 600 !important;
|
|
@@ -1027,7 +1281,7 @@ body, .gradio-container {
|
|
| 1027 |
.home-intro p,
|
| 1028 |
.home-intro .prose p,
|
| 1029 |
.gradio-container .home-intro p {
|
| 1030 |
-
color:
|
| 1031 |
font-size: 1.08rem !important;
|
| 1032 |
font-weight: 400 !important;
|
| 1033 |
line-height: 1.65 !important;
|
|
@@ -1040,7 +1294,7 @@ body, .gradio-container {
|
|
| 1040 |
line-height: 1.5;
|
| 1041 |
}
|
| 1042 |
.markdown strong, .md strong, .prose strong {
|
| 1043 |
-
color:
|
| 1044 |
font-weight: 600 !important;
|
| 1045 |
}
|
| 1046 |
|
|
@@ -1052,7 +1306,7 @@ body, .gradio-container {
|
|
| 1052 |
font-weight: 600 !important;
|
| 1053 |
letter-spacing: -0.01em;
|
| 1054 |
line-height: 1.3;
|
| 1055 |
-
color:
|
| 1056 |
}
|
| 1057 |
.home-snap-blurb,
|
| 1058 |
.benchmark-card-blurb {
|
|
@@ -1071,7 +1325,7 @@ body, .gradio-container {
|
|
| 1071 |
text-transform: uppercase !important;
|
| 1072 |
}
|
| 1073 |
.home-callouts strong {
|
| 1074 |
-
color:
|
| 1075 |
font-size: 1.15rem !important;
|
| 1076 |
font-weight: 600 !important;
|
| 1077 |
}
|
|
@@ -1112,7 +1366,7 @@ footer, .footer { display: none !important; }
|
|
| 1112 |
/* Search label lives in a Gradio BlockTitle span with its own font-weight */
|
| 1113 |
.leaderboard-search span[data-testid="block-info"],
|
| 1114 |
.leaderboard-search label > span {
|
| 1115 |
-
color:
|
| 1116 |
font-size: 0.95rem !important;
|
| 1117 |
font-weight: 700 !important;
|
| 1118 |
letter-spacing: -0.015em !important;
|
|
@@ -1122,11 +1376,49 @@ footer, .footer { display: none !important; }
|
|
| 1122 |
font-weight: 600 !important;
|
| 1123 |
}
|
| 1124 |
.leaderboard-search input::placeholder {
|
| 1125 |
-
color:
|
| 1126 |
font-size: 0.95rem !important;
|
| 1127 |
font-weight: 600 !important;
|
| 1128 |
opacity: 1 !important;
|
| 1129 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1130 |
"""
|
| 1131 |
|
| 1132 |
theme = gr.themes.Base(
|
|
@@ -1148,49 +1440,49 @@ theme = gr.themes.Base(
|
|
| 1148 |
font=[gr.themes.GoogleFont("Inter"), "ui-sans-serif", "system-ui", "sans-serif"],
|
| 1149 |
font_mono=[gr.themes.GoogleFont("IBM Plex Mono"), "ui-monospace", "monospace"],
|
| 1150 |
).set(
|
| 1151 |
-
body_background_fill="#
|
| 1152 |
body_background_fill_dark="#120b1b",
|
| 1153 |
-
body_text_color="#
|
| 1154 |
body_text_color_dark="#fafafa",
|
| 1155 |
-
body_text_color_subdued="#
|
| 1156 |
body_text_color_subdued_dark="#a3a3a3",
|
| 1157 |
-
background_fill_primary="#
|
| 1158 |
background_fill_primary_dark="#120b1b",
|
| 1159 |
-
background_fill_secondary="#
|
| 1160 |
background_fill_secondary_dark="#171021",
|
| 1161 |
-
block_background_fill="#
|
| 1162 |
block_background_fill_dark="#1d1429",
|
| 1163 |
-
block_border_color="#
|
| 1164 |
block_border_color_dark="#4a3962bf",
|
| 1165 |
-
block_label_text_color="#
|
| 1166 |
block_label_text_color_dark="#a3a3a3",
|
| 1167 |
-
block_title_text_color="#
|
| 1168 |
block_title_text_color_dark="#fafafa",
|
| 1169 |
-
border_color_primary="#
|
| 1170 |
border_color_primary_dark="#4a3962bf",
|
| 1171 |
button_primary_background_fill="#9334e9",
|
| 1172 |
button_primary_background_fill_dark="#9334e9",
|
| 1173 |
-
button_primary_background_fill_hover="#
|
| 1174 |
button_primary_background_fill_hover_dark="#8f35ff",
|
| 1175 |
button_primary_text_color="#ffffff",
|
| 1176 |
button_primary_text_color_dark="#ffffff",
|
| 1177 |
-
button_secondary_background_fill="#
|
| 1178 |
button_secondary_background_fill_dark="#ffffff05",
|
| 1179 |
-
button_secondary_background_fill_hover="
|
| 1180 |
button_secondary_background_fill_hover_dark="rgba(147, 52, 233, 0.10)",
|
| 1181 |
-
button_secondary_text_color="#
|
| 1182 |
button_secondary_text_color_dark="#fafafa",
|
| 1183 |
-
button_secondary_border_color="#
|
| 1184 |
button_secondary_border_color_dark="#d8b4fe26",
|
| 1185 |
-
input_background_fill="#
|
| 1186 |
input_background_fill_dark="#171021",
|
| 1187 |
-
input_border_color="#
|
| 1188 |
input_border_color_dark="#4a3962bf",
|
| 1189 |
-
input_placeholder_color="#
|
| 1190 |
input_placeholder_color_dark="#a3a3a3",
|
| 1191 |
-
link_text_color="#
|
| 1192 |
link_text_color_dark="#bf8bff",
|
| 1193 |
-
link_text_color_hover="#
|
| 1194 |
link_text_color_hover_dark="#d2a8ff",
|
| 1195 |
shadow_drop="none",
|
| 1196 |
shadow_drop_lg="none",
|
|
@@ -1530,10 +1822,163 @@ benchmarks = [
|
|
| 1530 |
|
| 1531 |
|
| 1532 |
custom_head = """
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1533 |
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
| 1534 |
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
| 1535 |
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet" />
|
| 1536 |
<script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1537 |
(() => {
|
| 1538 |
if (window.__inferbenchLeaderboardSortBound) return;
|
| 1539 |
window.__inferbenchLeaderboardSortBound = true;
|
|
|
|
| 23 |
|
| 24 |
# Visual tokens from https://www.pruna.ai/ and https://playground.pruna.ai/
|
| 25 |
custom_css = """
|
| 26 |
+
:root, :host, .dark, :host(.dark) {
|
| 27 |
--pruna-bg-primary: #120b1b;
|
| 28 |
--pruna-bg-card: #171021;
|
| 29 |
--pruna-bg-elevated: #1d1429;
|
| 30 |
+
--pruna-bg-header: #17101f;
|
| 31 |
--pruna-border: rgba(74, 57, 98, 0.75);
|
| 32 |
+
--pruna-hairline: rgba(255, 255, 255, 0.08);
|
| 33 |
--pruna-text-primary: #fafafa;
|
| 34 |
--pruna-text-body: #d4d4d4;
|
| 35 |
--pruna-text-muted: #a3a3a3;
|
|
|
|
| 38 |
--pruna-lavender: #d8b4fe;
|
| 39 |
--pruna-link: #bf8bff;
|
| 40 |
--pruna-font: "Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;
|
| 41 |
+
--pruna-glow: radial-gradient(ellipse 60% 35% at 50% -5%, rgba(147, 52, 233, 0.18), transparent 55%);
|
| 42 |
+
--pruna-card-bg: color-mix(in oklab, #1d1429 92%, black 8%);
|
| 43 |
+
--pruna-card-shadow: 0 24px 55px rgba(0, 0, 0, 0.42), inset 0 1px rgba(255, 255, 255, 0.04);
|
| 44 |
+
--pruna-callout-bg: color-mix(in oklab, #171021 82%, black 18%);
|
| 45 |
+
--pruna-menu-border: rgba(255, 255, 255, 0.08);
|
| 46 |
+
--pruna-menu-bg: rgba(255, 255, 255, 0.03);
|
| 47 |
+
--pruna-menu-hover-bg: rgba(255, 255, 255, 0.05);
|
| 48 |
+
--pruna-menu-hover-color: #e4e4e7;
|
| 49 |
+
--pruna-menu-selected-bg: rgba(143, 53, 255, 0.22);
|
| 50 |
+
--pruna-menu-selected-color: #ffffff;
|
| 51 |
+
--pruna-tab-hover: #e4e4e7;
|
| 52 |
+
--pruna-tab-selected: #ffffff;
|
| 53 |
+
--pruna-input-bg: rgba(255, 255, 255, 0.03);
|
| 54 |
+
--pruna-input-border: rgba(255, 255, 255, 0.08);
|
| 55 |
+
--pruna-focus-border: rgba(143, 53, 255, 0.45);
|
| 56 |
+
--pruna-focus-ring: 0 0 0 3px rgba(143, 53, 255, 0.16);
|
| 57 |
+
--pruna-table-hover: rgba(143, 53, 255, 0.16);
|
| 58 |
+
--pruna-table-hover-text: #ffffff;
|
| 59 |
+
--pruna-table-sticky: #17101f;
|
| 60 |
+
--pruna-table-sticky-hover: #2a1844;
|
| 61 |
+
--pruna-rank-bg: rgba(143, 53, 255, 0.22);
|
| 62 |
+
--pruna-rank-ring: 0 0 0 1px rgba(143, 53, 255, 0.45);
|
| 63 |
+
--pruna-score: #ddd6fe;
|
| 64 |
+
--pruna-accordion-bg: rgba(255, 255, 255, 0.02);
|
| 65 |
+
--pruna-accordion-border: rgba(216, 180, 254, 0.15);
|
| 66 |
+
--pruna-dropdown-hover: #2a1844;
|
| 67 |
+
color-scheme: dark;
|
| 68 |
+
}
|
| 69 |
+
|
| 70 |
+
.light, :host(.light) {
|
| 71 |
+
--pruna-bg-primary: #f6f3fa;
|
| 72 |
+
--pruna-bg-card: #ffffff;
|
| 73 |
+
--pruna-bg-elevated: #ffffff;
|
| 74 |
+
--pruna-bg-header: #f3eef8;
|
| 75 |
+
--pruna-border: rgba(126, 34, 206, 0.16);
|
| 76 |
+
--pruna-hairline: rgba(24, 24, 27, 0.08);
|
| 77 |
+
--pruna-text-primary: #18181b;
|
| 78 |
+
--pruna-text-body: #3f3f46;
|
| 79 |
+
--pruna-text-muted: #71717a;
|
| 80 |
+
--pruna-accent: #9334e9;
|
| 81 |
+
--pruna-accent-bright: #7c22ce;
|
| 82 |
+
--pruna-lavender: #7e22ce;
|
| 83 |
+
--pruna-link: #6d28d9;
|
| 84 |
+
--pruna-glow: radial-gradient(ellipse 60% 35% at 50% -5%, rgba(147, 52, 233, 0.10), transparent 55%);
|
| 85 |
+
--pruna-card-bg: #ffffff;
|
| 86 |
+
--pruna-card-shadow: 0 10px 28px rgba(88, 28, 135, 0.08);
|
| 87 |
+
--pruna-callout-bg: #ffffff;
|
| 88 |
+
--pruna-menu-border: var(--pruna-border);
|
| 89 |
+
--pruna-menu-bg: var(--pruna-bg-card);
|
| 90 |
+
--pruna-menu-hover-bg: rgba(147, 52, 233, 0.06);
|
| 91 |
+
--pruna-menu-hover-color: var(--pruna-text-primary);
|
| 92 |
+
--pruna-menu-selected-bg: rgba(147, 52, 233, 0.12);
|
| 93 |
+
--pruna-menu-selected-color: var(--pruna-accent-bright);
|
| 94 |
+
--pruna-tab-hover: var(--pruna-text-primary);
|
| 95 |
+
--pruna-tab-selected: var(--pruna-text-primary);
|
| 96 |
+
--pruna-input-bg: var(--pruna-bg-card);
|
| 97 |
+
--pruna-input-border: var(--pruna-border);
|
| 98 |
+
--pruna-focus-border: rgba(124, 34, 206, 0.45);
|
| 99 |
+
--pruna-focus-ring: 0 0 0 3px rgba(143, 53, 255, 0.16);
|
| 100 |
+
--pruna-table-hover: rgba(147, 52, 233, 0.08);
|
| 101 |
+
--pruna-table-hover-text: var(--pruna-text-primary);
|
| 102 |
+
--pruna-table-sticky: var(--pruna-bg-card);
|
| 103 |
+
--pruna-table-sticky-hover: #f3e8ff;
|
| 104 |
+
--pruna-rank-bg: rgba(147, 52, 233, 0.12);
|
| 105 |
+
--pruna-rank-ring: 0 0 0 1px rgba(147, 52, 233, 0.28);
|
| 106 |
+
--pruna-score: var(--pruna-accent-bright);
|
| 107 |
+
--pruna-accordion-bg: var(--pruna-bg-card);
|
| 108 |
+
--pruna-accordion-border: var(--pruna-border);
|
| 109 |
+
--pruna-dropdown-hover: #f3e8ff;
|
| 110 |
+
color-scheme: light;
|
| 111 |
}
|
| 112 |
|
| 113 |
html, body, .gradio-container, .main {
|
|
|
|
| 118 |
|
| 119 |
/* Subtle depth — not a marketing-site hero glow */
|
| 120 |
body, .gradio-container {
|
| 121 |
+
background-image: var(--pruna-glow) !important;
|
|
|
|
| 122 |
background-attachment: fixed !important;
|
| 123 |
}
|
| 124 |
|
|
|
|
| 146 |
overflow: visible !important;
|
| 147 |
}
|
| 148 |
.app-header {
|
| 149 |
+
position: relative;
|
| 150 |
display: flex;
|
| 151 |
flex-direction: column;
|
| 152 |
align-items: center;
|
| 153 |
width: 100%;
|
| 154 |
margin: 8px 0 16px;
|
| 155 |
+
padding: 8px 48px 0;
|
| 156 |
text-align: center;
|
| 157 |
}
|
| 158 |
+
.app-header .theme-toggle,
|
| 159 |
+
button.theme-toggle {
|
| 160 |
+
position: absolute;
|
| 161 |
+
top: 8px;
|
| 162 |
+
right: 0;
|
| 163 |
+
display: inline-flex !important;
|
| 164 |
+
align-items: center !important;
|
| 165 |
+
justify-content: center !important;
|
| 166 |
+
width: 36px !important;
|
| 167 |
+
height: 36px !important;
|
| 168 |
+
min-width: 36px !important;
|
| 169 |
+
min-height: 36px !important;
|
| 170 |
+
margin: 0 !important;
|
| 171 |
+
padding: 0 !important;
|
| 172 |
+
border: 1px solid var(--pruna-menu-border) !important;
|
| 173 |
+
border-radius: 10px !important;
|
| 174 |
+
background: var(--pruna-menu-bg) !important;
|
| 175 |
+
color: var(--pruna-text-muted) !important;
|
| 176 |
+
box-shadow: none !important;
|
| 177 |
+
appearance: none !important;
|
| 178 |
+
-webkit-appearance: none !important;
|
| 179 |
+
box-sizing: border-box !important;
|
| 180 |
+
font: inherit !important;
|
| 181 |
+
line-height: 0 !important;
|
| 182 |
+
cursor: pointer;
|
| 183 |
+
z-index: 6;
|
| 184 |
+
}
|
| 185 |
+
.app-header .theme-toggle:hover,
|
| 186 |
+
button.theme-toggle:hover {
|
| 187 |
+
color: var(--pruna-menu-hover-color) !important;
|
| 188 |
+
background: var(--pruna-menu-hover-bg) !important;
|
| 189 |
+
border-color: var(--pruna-menu-border) !important;
|
| 190 |
+
box-shadow: none !important;
|
| 191 |
+
}
|
| 192 |
+
.app-header .theme-toggle:focus,
|
| 193 |
+
button.theme-toggle:focus {
|
| 194 |
+
outline: none !important;
|
| 195 |
+
}
|
| 196 |
+
.app-header .theme-toggle:focus-visible,
|
| 197 |
+
button.theme-toggle:focus-visible {
|
| 198 |
+
color: var(--pruna-menu-hover-color) !important;
|
| 199 |
+
background: var(--pruna-menu-hover-bg) !important;
|
| 200 |
+
border-color: var(--pruna-focus-border) !important;
|
| 201 |
+
box-shadow: var(--pruna-focus-ring) !important;
|
| 202 |
+
}
|
| 203 |
+
.app-header .theme-toggle svg,
|
| 204 |
+
button.theme-toggle svg {
|
| 205 |
+
width: 18px;
|
| 206 |
+
height: 18px;
|
| 207 |
+
flex-shrink: 0;
|
| 208 |
+
}
|
| 209 |
+
.app-header .theme-toggle .theme-icon-sun,
|
| 210 |
+
button.theme-toggle .theme-icon-sun { display: block !important; }
|
| 211 |
+
.app-header .theme-toggle .theme-icon-moon,
|
| 212 |
+
button.theme-toggle .theme-icon-moon { display: none !important; }
|
| 213 |
+
.app-header .theme-toggle[data-mode="light"] .theme-icon-sun,
|
| 214 |
+
button.theme-toggle[data-mode="light"] .theme-icon-sun { display: none !important; }
|
| 215 |
+
.app-header .theme-toggle[data-mode="light"] .theme-icon-moon,
|
| 216 |
+
button.theme-toggle[data-mode="light"] .theme-icon-moon { display: block !important; }
|
| 217 |
.app-header-brand {
|
| 218 |
display: inline-flex !important;
|
| 219 |
flex-direction: row;
|
|
|
|
| 251 |
gap: 2px;
|
| 252 |
}
|
| 253 |
.main-tabs .tab-container::after {
|
| 254 |
+
background: var(--pruna-hairline) !important;
|
| 255 |
}
|
| 256 |
.main-tabs .tab-container > button {
|
| 257 |
font-family: var(--pruna-font) !important;
|
|
|
|
| 268 |
height: auto !important;
|
| 269 |
}
|
| 270 |
.main-tabs .tab-container > button:hover:not(.selected) {
|
| 271 |
+
color: var(--pruna-tab-hover) !important;
|
| 272 |
background: transparent !important;
|
| 273 |
}
|
| 274 |
.main-tabs .tab-container > button.selected,
|
| 275 |
.main-tabs .tab-container > button[aria-selected="true"] {
|
| 276 |
+
color: var(--pruna-tab-selected) !important;
|
| 277 |
background: transparent !important;
|
| 278 |
}
|
| 279 |
.main-tabs .tab-container > button.selected::after,
|
|
|
|
| 342 |
gap: 4px !important;
|
| 343 |
width: 100%;
|
| 344 |
padding: 4px !important;
|
| 345 |
+
border: 1px solid var(--pruna-menu-border) !important;
|
| 346 |
border-radius: 12px !important;
|
| 347 |
+
background: var(--pruna-menu-bg) !important;
|
| 348 |
}
|
| 349 |
.benchmark-view-menu label {
|
| 350 |
display: flex !important;
|
|
|
|
| 364 |
cursor: pointer;
|
| 365 |
}
|
| 366 |
.benchmark-view-menu label:hover {
|
| 367 |
+
color: var(--pruna-menu-hover-color) !important;
|
| 368 |
+
background: var(--pruna-menu-hover-bg) !important;
|
| 369 |
}
|
| 370 |
.benchmark-view-menu label.selected {
|
| 371 |
+
color: var(--pruna-menu-selected-color) !important;
|
| 372 |
+
background: var(--pruna-menu-selected-bg) !important;
|
| 373 |
}
|
| 374 |
.benchmark-view-menu input[type="radio"] {
|
| 375 |
position: absolute !important;
|
|
|
|
| 410 |
padding: 18px 20px !important;
|
| 411 |
border: 1px solid var(--pruna-border) !important;
|
| 412 |
border-radius: 16px !important;
|
| 413 |
+
background: var(--pruna-card-bg) !important;
|
| 414 |
+
box-shadow: var(--pruna-card-shadow) !important;
|
| 415 |
}
|
| 416 |
.benchmark-card-col:hover {
|
| 417 |
border-color: color-mix(in srgb, var(--pruna-accent) 50%, transparent) !important;
|
|
|
|
| 444 |
.compare-prompt-block {
|
| 445 |
border: 1px solid var(--pruna-border) !important;
|
| 446 |
border-radius: 16px !important;
|
| 447 |
+
background: var(--pruna-card-bg) !important;
|
| 448 |
+
box-shadow: var(--pruna-card-shadow) !important;
|
| 449 |
}
|
| 450 |
|
| 451 |
/* Page footer — flat community strip + quiet citation accordion */
|
|
|
|
| 466 |
.page-footer {
|
| 467 |
margin: 32px 0 16px;
|
| 468 |
padding: 20px 0 0;
|
| 469 |
+
border-top: 1px solid var(--pruna-hairline);
|
| 470 |
}
|
| 471 |
.page-footer h3 {
|
| 472 |
margin: 0 0 10px !important;
|
|
|
|
| 474 |
font-weight: 600 !important;
|
| 475 |
letter-spacing: -0.015em !important;
|
| 476 |
text-transform: none !important;
|
| 477 |
+
color: var(--pruna-text-primary) !important;
|
| 478 |
}
|
| 479 |
.community-footer-links {
|
| 480 |
display: flex;
|
|
|
|
| 498 |
}
|
| 499 |
.citation-accordion,
|
| 500 |
.citation-accordion.block {
|
| 501 |
+
border: 1px solid var(--pruna-accordion-border) !important;
|
| 502 |
border-radius: 10px !important;
|
| 503 |
+
background: var(--pruna-accordion-bg) !important;
|
| 504 |
box-shadow: none !important;
|
| 505 |
overflow: hidden !important;
|
| 506 |
}
|
|
|
|
| 512 |
padding: 11px 14px !important;
|
| 513 |
font-size: 0.92rem !important;
|
| 514 |
font-weight: 500 !important;
|
| 515 |
+
color: var(--pruna-text-primary) !important;
|
| 516 |
letter-spacing: -0.01em !important;
|
| 517 |
}
|
| 518 |
.citation-accordion > .label-wrap:hover,
|
| 519 |
.citation-accordion .label-wrap:hover {
|
| 520 |
+
background: var(--pruna-menu-hover-bg) !important;
|
| 521 |
}
|
| 522 |
.citation-accordion > .label-wrap span,
|
| 523 |
.citation-accordion .label-wrap span {
|
| 524 |
+
color: var(--pruna-text-primary) !important;
|
| 525 |
font-size: 0.92rem !important;
|
| 526 |
font-weight: 500 !important;
|
| 527 |
}
|
|
|
|
| 541 |
}
|
| 542 |
.citation-accordion .wrap,
|
| 543 |
.citation-accordion > .wrap {
|
| 544 |
+
border-top: 1px solid var(--pruna-hairline) !important;
|
| 545 |
padding: 4px 14px 12px !important;
|
| 546 |
background: transparent !important;
|
| 547 |
}
|
|
|
|
| 585 |
}
|
| 586 |
.home-callouts > div {
|
| 587 |
padding: 14px 16px;
|
| 588 |
+
background: var(--pruna-callout-bg) !important;
|
| 589 |
box-shadow: none !important;
|
| 590 |
}
|
| 591 |
.home-callouts span {
|
|
|
|
| 653 |
font-weight: 600 !important;
|
| 654 |
letter-spacing: -0.01em;
|
| 655 |
line-height: 1.3 !important;
|
| 656 |
+
color: var(--pruna-text-primary) !important;
|
| 657 |
}
|
| 658 |
.home-snap-emoji {
|
| 659 |
display: inline-flex;
|
|
|
|
| 676 |
}
|
| 677 |
.home-snap-top {
|
| 678 |
padding-top: 10px;
|
| 679 |
+
border-top: 1px solid var(--pruna-hairline);
|
| 680 |
width: 100%;
|
| 681 |
}
|
| 682 |
.home-top-label {
|
|
|
|
| 694 |
gap: 10px;
|
| 695 |
align-items: center;
|
| 696 |
padding: 8px 0;
|
| 697 |
+
border-bottom: 1px solid var(--pruna-hairline);
|
| 698 |
color: var(--pruna-text-primary) !important;
|
| 699 |
}
|
| 700 |
@media (max-width: 700px) {
|
|
|
|
| 723 |
width: 28px;
|
| 724 |
height: 28px;
|
| 725 |
border-radius: 999px;
|
| 726 |
+
background: var(--pruna-rank-bg) !important;
|
| 727 |
color: var(--pruna-lavender) !important;
|
| 728 |
font-weight: 700;
|
| 729 |
font-size: 13px;
|
| 730 |
display: inline-flex;
|
| 731 |
align-items: center;
|
| 732 |
justify-content: center;
|
| 733 |
+
box-shadow: var(--pruna-rank-ring);
|
| 734 |
}
|
| 735 |
.home-model,
|
| 736 |
.prose .home-model {
|
|
|
|
| 741 |
.home-score,
|
| 742 |
.prose .home-score {
|
| 743 |
font-variant-numeric: tabular-nums;
|
| 744 |
+
color: var(--pruna-score) !important;
|
| 745 |
font-weight: 600;
|
| 746 |
}
|
| 747 |
.home-empty,
|
|
|
|
| 781 |
.leaderboard-search label,
|
| 782 |
.leaderboard-search .block-label,
|
| 783 |
.leaderboard-search .block-label span {
|
| 784 |
+
color: var(--pruna-text-primary) !important;
|
| 785 |
font-size: 0.85rem !important;
|
| 786 |
font-weight: 700 !important;
|
| 787 |
letter-spacing: -0.01em !important;
|
|
|
|
| 792 |
min-height: 40px !important;
|
| 793 |
height: 40px !important;
|
| 794 |
padding: 0 12px !important;
|
| 795 |
+
border: 1px solid var(--pruna-input-border) !important;
|
| 796 |
border-radius: 10px !important;
|
| 797 |
+
background: var(--pruna-input-bg) !important;
|
| 798 |
box-shadow: none !important;
|
| 799 |
color: var(--pruna-text-primary) !important;
|
| 800 |
font-family: var(--pruna-font) !important;
|
|
|
|
| 813 |
.leaderboard-search input:focus,
|
| 814 |
.leaderboard-controls input:focus,
|
| 815 |
.leaderboard-controls textarea:focus {
|
| 816 |
+
border-color: var(--pruna-focus-border) !important;
|
| 817 |
outline: none !important;
|
| 818 |
+
box-shadow: var(--pruna-focus-ring) !important;
|
| 819 |
}
|
| 820 |
.leaderboard-controls .wrap,
|
| 821 |
.leaderboard-controls .wrap-inner,
|
| 822 |
.leaderboard-controls .secondary-wrap {
|
| 823 |
min-height: 40px !important;
|
| 824 |
+
border: 1px solid var(--pruna-input-border) !important;
|
| 825 |
border-radius: 10px !important;
|
| 826 |
+
background: var(--pruna-input-bg) !important;
|
| 827 |
box-shadow: none !important;
|
| 828 |
}
|
| 829 |
.ranking-table-host,
|
|
|
|
| 842 |
--block-border-width: 0 !important;
|
| 843 |
}
|
| 844 |
.ranking-table-scroll {
|
| 845 |
+
border: 1px solid var(--pruna-menu-border);
|
| 846 |
border-radius: 12px;
|
| 847 |
+
background: var(--pruna-menu-bg);
|
| 848 |
box-shadow: none;
|
| 849 |
max-height: min(70vh, 720px);
|
| 850 |
overflow: auto;
|
|
|
|
| 883 |
vertical-align: middle !important;
|
| 884 |
padding: 11px 14px !important;
|
| 885 |
border: 0 !important;
|
| 886 |
+
border-bottom: 1px solid var(--pruna-hairline) !important;
|
| 887 |
background: transparent !important;
|
| 888 |
box-shadow: none !important;
|
| 889 |
outline: none !important;
|
|
|
|
| 893 |
position: sticky;
|
| 894 |
top: 0;
|
| 895 |
z-index: 3;
|
| 896 |
+
background: var(--pruna-bg-header) !important;
|
| 897 |
color: var(--pruna-text-muted) !important;
|
| 898 |
font-size: 11px !important;
|
| 899 |
font-weight: 600 !important;
|
|
|
|
| 901 |
text-align: left;
|
| 902 |
text-transform: uppercase;
|
| 903 |
white-space: nowrap;
|
| 904 |
+
box-shadow: 0 1px 0 var(--pruna-hairline) !important;
|
| 905 |
}
|
| 906 |
.ranking-table th.sortable-col { cursor: pointer; user-select: none; }
|
| 907 |
.ranking-table th.sortable-col:hover { color: var(--pruna-lavender) !important; }
|
|
|
|
| 915 |
.ranking-table th.sortable-col.sorted-desc::after { content: "▼"; }
|
| 916 |
.ranking-table tbody tr:last-child td { border-bottom: 0 !important; }
|
| 917 |
.ranking-table tbody tr:hover td {
|
| 918 |
+
background: var(--pruna-table-hover) !important;
|
| 919 |
}
|
| 920 |
.ranking-table tbody tr:hover td,
|
| 921 |
.ranking-table tbody tr:hover .rank,
|
| 922 |
.ranking-table tbody tr:hover .metric-score,
|
| 923 |
.ranking-table tbody tr:hover .text-cell,
|
| 924 |
.ranking-table tbody tr:hover .model-cell strong,
|
| 925 |
+
.ranking-table tbody tr:hover .model-cell span { color: var(--pruna-table-hover-text) !important; }
|
| 926 |
.ranking-table .rank,
|
| 927 |
.prose .ranking-table .rank {
|
| 928 |
position: sticky;
|
|
|
|
| 934 |
color: var(--pruna-lavender) !important;
|
| 935 |
font-weight: 700 !important;
|
| 936 |
text-align: center;
|
| 937 |
+
background: var(--pruna-table-sticky) !important;
|
| 938 |
}
|
| 939 |
.ranking-table th.rank,
|
| 940 |
.prose .ranking-table th.rank {
|
|
|
|
| 942 |
left: 0;
|
| 943 |
z-index: 5;
|
| 944 |
text-align: center;
|
| 945 |
+
background: var(--pruna-bg-header) !important;
|
| 946 |
}
|
| 947 |
.ranking-table .model-cell,
|
| 948 |
.prose .ranking-table .model-cell {
|
|
|
|
| 951 |
z-index: 1;
|
| 952 |
min-width: 180px;
|
| 953 |
max-width: 260px;
|
| 954 |
+
background: var(--pruna-table-sticky) !important;
|
| 955 |
}
|
| 956 |
.ranking-table th.model-cell,
|
| 957 |
.prose .ranking-table th.model-cell {
|
| 958 |
top: 0;
|
| 959 |
left: 3.25rem;
|
| 960 |
z-index: 5;
|
| 961 |
+
background: var(--pruna-bg-header) !important;
|
| 962 |
}
|
| 963 |
.ranking-table tbody tr:hover .rank,
|
| 964 |
.ranking-table tbody tr:hover .model-cell {
|
| 965 |
+
background: var(--pruna-table-sticky-hover) !important;
|
| 966 |
}
|
| 967 |
.ranking-table .model-cell strong,
|
| 968 |
.ranking-table .model-cell span { display: block; }
|
|
|
|
| 1000 |
}
|
| 1001 |
|
| 1002 |
.compare-samples-help { color: var(--pruna-text-body); margin-bottom: 8px; }
|
| 1003 |
+
.compare-controls {
|
| 1004 |
+
align-items: flex-end !important;
|
| 1005 |
+
gap: 12px !important;
|
| 1006 |
+
margin-bottom: 16px;
|
| 1007 |
+
}
|
| 1008 |
+
.compare-controls > .block,
|
| 1009 |
+
.compare-controls .form,
|
| 1010 |
+
.compare-controls .block,
|
| 1011 |
+
.compare-controls .compare-models,
|
| 1012 |
+
.compare-controls .compare-prompt-count {
|
| 1013 |
+
border: none !important;
|
| 1014 |
+
background: transparent !important;
|
| 1015 |
+
box-shadow: none !important;
|
| 1016 |
+
padding: 0 !important;
|
| 1017 |
+
--block-border-width: 0 !important;
|
| 1018 |
+
}
|
| 1019 |
+
.compare-controls label,
|
| 1020 |
+
.compare-controls span[data-testid="block-info"] {
|
| 1021 |
+
display: block !important;
|
| 1022 |
+
margin: 0 0 6px !important;
|
| 1023 |
+
padding: 0 !important;
|
| 1024 |
+
color: var(--pruna-text-muted) !important;
|
| 1025 |
+
font-size: 0.8rem !important;
|
| 1026 |
+
font-weight: 500 !important;
|
| 1027 |
+
line-height: 1.2 !important;
|
| 1028 |
+
}
|
| 1029 |
+
.compare-controls .compare-models span[data-testid="block-info"] {
|
| 1030 |
+
min-height: 1.15rem;
|
| 1031 |
+
}
|
| 1032 |
+
.compare-controls .compare-models {
|
| 1033 |
+
flex: 4 1 0 !important;
|
| 1034 |
+
min-width: 280px !important;
|
| 1035 |
+
}
|
| 1036 |
+
.compare-controls .compare-prompt-count {
|
| 1037 |
+
flex: 1 1 180px !important;
|
| 1038 |
+
max-width: 240px !important;
|
| 1039 |
+
}
|
| 1040 |
+
.compare-controls .compare-models .wrap-inner,
|
| 1041 |
+
.compare-controls .compare-models .wrap {
|
| 1042 |
+
min-height: 40px !important;
|
| 1043 |
+
height: 40px !important;
|
| 1044 |
+
border: 1px solid var(--pruna-input-border) !important;
|
| 1045 |
+
border-radius: 10px !important;
|
| 1046 |
+
background: var(--pruna-input-bg) !important;
|
| 1047 |
+
box-shadow: none !important;
|
| 1048 |
+
}
|
| 1049 |
+
.compare-controls .compare-prompt-count .wrap {
|
| 1050 |
+
display: grid !important;
|
| 1051 |
+
grid-template-columns: minmax(0, 1fr) auto;
|
| 1052 |
+
grid-template-rows: auto 40px;
|
| 1053 |
+
gap: 6px 10px;
|
| 1054 |
+
align-items: center;
|
| 1055 |
+
width: 100%;
|
| 1056 |
+
min-height: 0 !important;
|
| 1057 |
+
height: auto !important;
|
| 1058 |
+
margin: 0 !important;
|
| 1059 |
+
padding: 0 !important;
|
| 1060 |
+
border: none !important;
|
| 1061 |
+
background: transparent !important;
|
| 1062 |
+
box-shadow: none !important;
|
| 1063 |
+
}
|
| 1064 |
+
.compare-controls .compare-prompt-count .head {
|
| 1065 |
+
display: contents;
|
| 1066 |
+
margin: 0 !important;
|
| 1067 |
+
}
|
| 1068 |
+
.compare-controls .compare-prompt-count .head label {
|
| 1069 |
+
grid-column: 1 / -1;
|
| 1070 |
+
grid-row: 1;
|
| 1071 |
+
}
|
| 1072 |
+
.compare-controls .compare-prompt-count .tab-like-container {
|
| 1073 |
+
grid-column: 2;
|
| 1074 |
+
grid-row: 2;
|
| 1075 |
+
height: 40px !important;
|
| 1076 |
+
min-height: 40px !important;
|
| 1077 |
+
align-self: stretch;
|
| 1078 |
+
border: 1px solid var(--pruna-input-border) !important;
|
| 1079 |
+
border-radius: 10px !important;
|
| 1080 |
+
background: var(--pruna-input-bg) !important;
|
| 1081 |
+
overflow: hidden;
|
| 1082 |
+
}
|
| 1083 |
+
.compare-controls .compare-prompt-count .slider_input_container {
|
| 1084 |
+
grid-column: 1;
|
| 1085 |
+
grid-row: 2;
|
| 1086 |
+
height: 40px !important;
|
| 1087 |
+
min-height: 40px !important;
|
| 1088 |
+
margin: 0 !important;
|
| 1089 |
+
gap: 0 !important;
|
| 1090 |
+
}
|
| 1091 |
+
.compare-controls .compare-prompt-count .min_value,
|
| 1092 |
+
.compare-controls .compare-prompt-count .max_value {
|
| 1093 |
+
display: none !important;
|
| 1094 |
+
}
|
| 1095 |
+
.compare-controls .compare-prompt-count input[type="range"] {
|
| 1096 |
+
height: 40px !important;
|
| 1097 |
+
min-width: 0 !important;
|
| 1098 |
+
margin: 0 !important;
|
| 1099 |
+
padding: 0 !important;
|
| 1100 |
+
background: transparent !important;
|
| 1101 |
+
border: none !important;
|
| 1102 |
+
box-shadow: none !important;
|
| 1103 |
+
}
|
| 1104 |
+
.compare-controls .compare-prompt-count input[type="number"] {
|
| 1105 |
+
height: 40px !important;
|
| 1106 |
+
min-height: 40px !important;
|
| 1107 |
+
min-width: 2.5rem !important;
|
| 1108 |
+
margin: 0 !important;
|
| 1109 |
+
padding: 0 8px !important;
|
| 1110 |
+
line-height: 40px !important;
|
| 1111 |
+
border: none !important;
|
| 1112 |
+
background: transparent !important;
|
| 1113 |
+
box-shadow: none !important;
|
| 1114 |
+
}
|
| 1115 |
+
.compare-controls .compare-shuffle,
|
| 1116 |
+
.compare-controls .compare-shuffle button {
|
| 1117 |
+
height: 40px !important;
|
| 1118 |
+
min-height: 40px !important;
|
| 1119 |
+
margin: 0 !important;
|
| 1120 |
+
padding: 0 14px !important;
|
| 1121 |
+
border-radius: 10px !important;
|
| 1122 |
+
align-self: flex-end !important;
|
| 1123 |
+
}
|
| 1124 |
.compare-prompt-block {
|
| 1125 |
margin: 0 0 22px;
|
| 1126 |
padding: 14px 16px;
|
| 1127 |
+
background: var(--pruna-callout-bg) !important;
|
| 1128 |
}
|
| 1129 |
.compare-prompt-meta {
|
| 1130 |
display: flex;
|
|
|
|
| 1158 |
aspect-ratio: 1 / 1;
|
| 1159 |
object-fit: cover;
|
| 1160 |
border-radius: 12px;
|
| 1161 |
+
border: 1px solid var(--pruna-border);
|
| 1162 |
background: var(--pruna-bg-elevated);
|
| 1163 |
}
|
| 1164 |
.compare-empty {
|
|
|
|
| 1189 |
font-weight: 700 !important;
|
| 1190 |
letter-spacing: -0.035em;
|
| 1191 |
line-height: 1 !important;
|
| 1192 |
+
color: var(--pruna-text-primary) !important;
|
| 1193 |
}
|
| 1194 |
.app-header-tagline,
|
| 1195 |
.prose .app-header-tagline,
|
|
|
|
| 1210 |
.markdown h1, .md h1, .prose h1 {
|
| 1211 |
margin: 0 0 0.65rem !important;
|
| 1212 |
padding: 0 !important;
|
| 1213 |
+
color: var(--pruna-text-primary) !important;
|
| 1214 |
font-family: var(--pruna-font) !important;
|
| 1215 |
font-size: 1.5rem !important;
|
| 1216 |
font-weight: 700 !important;
|
|
|
|
| 1222 |
.markdown h2, .md h2, .prose h2 {
|
| 1223 |
margin: 1.75rem 0 0.75rem !important;
|
| 1224 |
padding: 0 !important;
|
| 1225 |
+
color: var(--pruna-text-primary) !important;
|
| 1226 |
font-family: var(--pruna-font) !important;
|
| 1227 |
font-size: 1.25rem !important;
|
| 1228 |
font-weight: 600 !important;
|
|
|
|
| 1234 |
.markdown h3, .md h3, .prose h3 {
|
| 1235 |
margin: 1.35rem 0 0.5rem !important;
|
| 1236 |
padding: 0 !important;
|
| 1237 |
+
color: var(--pruna-text-primary) !important;
|
| 1238 |
font-family: var(--pruna-font) !important;
|
| 1239 |
font-size: 1.05rem !important;
|
| 1240 |
font-weight: 600 !important;
|
|
|
|
| 1281 |
.home-intro p,
|
| 1282 |
.home-intro .prose p,
|
| 1283 |
.gradio-container .home-intro p {
|
| 1284 |
+
color: var(--pruna-text-body) !important;
|
| 1285 |
font-size: 1.08rem !important;
|
| 1286 |
font-weight: 400 !important;
|
| 1287 |
line-height: 1.65 !important;
|
|
|
|
| 1294 |
line-height: 1.5;
|
| 1295 |
}
|
| 1296 |
.markdown strong, .md strong, .prose strong {
|
| 1297 |
+
color: var(--pruna-text-primary) !important;
|
| 1298 |
font-weight: 600 !important;
|
| 1299 |
}
|
| 1300 |
|
|
|
|
| 1306 |
font-weight: 600 !important;
|
| 1307 |
letter-spacing: -0.01em;
|
| 1308 |
line-height: 1.3;
|
| 1309 |
+
color: var(--pruna-text-primary) !important;
|
| 1310 |
}
|
| 1311 |
.home-snap-blurb,
|
| 1312 |
.benchmark-card-blurb {
|
|
|
|
| 1325 |
text-transform: uppercase !important;
|
| 1326 |
}
|
| 1327 |
.home-callouts strong {
|
| 1328 |
+
color: var(--pruna-text-primary) !important;
|
| 1329 |
font-size: 1.15rem !important;
|
| 1330 |
font-weight: 600 !important;
|
| 1331 |
}
|
|
|
|
| 1366 |
/* Search label lives in a Gradio BlockTitle span with its own font-weight */
|
| 1367 |
.leaderboard-search span[data-testid="block-info"],
|
| 1368 |
.leaderboard-search label > span {
|
| 1369 |
+
color: var(--pruna-text-primary) !important;
|
| 1370 |
font-size: 0.95rem !important;
|
| 1371 |
font-weight: 700 !important;
|
| 1372 |
letter-spacing: -0.015em !important;
|
|
|
|
| 1376 |
font-weight: 600 !important;
|
| 1377 |
}
|
| 1378 |
.leaderboard-search input::placeholder {
|
| 1379 |
+
color: var(--pruna-text-muted) !important;
|
| 1380 |
font-size: 0.95rem !important;
|
| 1381 |
font-weight: 600 !important;
|
| 1382 |
opacity: 1 !important;
|
| 1383 |
}
|
| 1384 |
+
|
| 1385 |
+
.pareto-help {
|
| 1386 |
+
color: var(--pruna-text-muted) !important;
|
| 1387 |
+
font-size: 0.95rem;
|
| 1388 |
+
}
|
| 1389 |
+
.pareto-help-emphasis {
|
| 1390 |
+
color: var(--pruna-text-primary) !important;
|
| 1391 |
+
font-size: 1rem;
|
| 1392 |
+
}
|
| 1393 |
+
|
| 1394 |
+
.options,
|
| 1395 |
+
ul.options,
|
| 1396 |
+
.dropdown-arrow-inner {
|
| 1397 |
+
background: var(--pruna-bg-card) !important;
|
| 1398 |
+
color: var(--pruna-text-primary) !important;
|
| 1399 |
+
border-color: var(--pruna-border) !important;
|
| 1400 |
+
}
|
| 1401 |
+
.options .item,
|
| 1402 |
+
.options li {
|
| 1403 |
+
color: var(--pruna-text-primary) !important;
|
| 1404 |
+
}
|
| 1405 |
+
.options .item:hover,
|
| 1406 |
+
.options li:hover,
|
| 1407 |
+
.options .item.selected {
|
| 1408 |
+
background: var(--pruna-dropdown-hover) !important;
|
| 1409 |
+
color: var(--pruna-text-primary) !important;
|
| 1410 |
+
}
|
| 1411 |
+
input[type="range"] {
|
| 1412 |
+
accent-color: var(--pruna-accent);
|
| 1413 |
+
}
|
| 1414 |
+
.pareto-plot,
|
| 1415 |
+
.pareto-plot.block,
|
| 1416 |
+
.pareto-plot .plotly,
|
| 1417 |
+
.pareto-plot .js-plotly-plot,
|
| 1418 |
+
.pareto-plot .plot-container {
|
| 1419 |
+
background: transparent !important;
|
| 1420 |
+
border-color: var(--pruna-border) !important;
|
| 1421 |
+
}
|
| 1422 |
"""
|
| 1423 |
|
| 1424 |
theme = gr.themes.Base(
|
|
|
|
| 1440 |
font=[gr.themes.GoogleFont("Inter"), "ui-sans-serif", "system-ui", "sans-serif"],
|
| 1441 |
font_mono=[gr.themes.GoogleFont("IBM Plex Mono"), "ui-monospace", "monospace"],
|
| 1442 |
).set(
|
| 1443 |
+
body_background_fill="#f6f3fa",
|
| 1444 |
body_background_fill_dark="#120b1b",
|
| 1445 |
+
body_text_color="#18181b",
|
| 1446 |
body_text_color_dark="#fafafa",
|
| 1447 |
+
body_text_color_subdued="#71717a",
|
| 1448 |
body_text_color_subdued_dark="#a3a3a3",
|
| 1449 |
+
background_fill_primary="#f6f3fa",
|
| 1450 |
background_fill_primary_dark="#120b1b",
|
| 1451 |
+
background_fill_secondary="#ffffff",
|
| 1452 |
background_fill_secondary_dark="#171021",
|
| 1453 |
+
block_background_fill="#ffffff",
|
| 1454 |
block_background_fill_dark="#1d1429",
|
| 1455 |
+
block_border_color="#e4d7f2",
|
| 1456 |
block_border_color_dark="#4a3962bf",
|
| 1457 |
+
block_label_text_color="#71717a",
|
| 1458 |
block_label_text_color_dark="#a3a3a3",
|
| 1459 |
+
block_title_text_color="#18181b",
|
| 1460 |
block_title_text_color_dark="#fafafa",
|
| 1461 |
+
border_color_primary="#e4d7f2",
|
| 1462 |
border_color_primary_dark="#4a3962bf",
|
| 1463 |
button_primary_background_fill="#9334e9",
|
| 1464 |
button_primary_background_fill_dark="#9334e9",
|
| 1465 |
+
button_primary_background_fill_hover="#7c22ce",
|
| 1466 |
button_primary_background_fill_hover_dark="#8f35ff",
|
| 1467 |
button_primary_text_color="#ffffff",
|
| 1468 |
button_primary_text_color_dark="#ffffff",
|
| 1469 |
+
button_secondary_background_fill="#ffffff",
|
| 1470 |
button_secondary_background_fill_dark="#ffffff05",
|
| 1471 |
+
button_secondary_background_fill_hover="#f3e8ff",
|
| 1472 |
button_secondary_background_fill_hover_dark="rgba(147, 52, 233, 0.10)",
|
| 1473 |
+
button_secondary_text_color="#18181b",
|
| 1474 |
button_secondary_text_color_dark="#fafafa",
|
| 1475 |
+
button_secondary_border_color="#e4d7f2",
|
| 1476 |
button_secondary_border_color_dark="#d8b4fe26",
|
| 1477 |
+
input_background_fill="#ffffff",
|
| 1478 |
input_background_fill_dark="#171021",
|
| 1479 |
+
input_border_color="#e4d7f2",
|
| 1480 |
input_border_color_dark="#4a3962bf",
|
| 1481 |
+
input_placeholder_color="#71717a",
|
| 1482 |
input_placeholder_color_dark="#a3a3a3",
|
| 1483 |
+
link_text_color="#6d28d9",
|
| 1484 |
link_text_color_dark="#bf8bff",
|
| 1485 |
+
link_text_color_hover="#7c22ce",
|
| 1486 |
link_text_color_hover_dark="#d2a8ff",
|
| 1487 |
shadow_drop="none",
|
| 1488 |
shadow_drop_lg="none",
|
|
|
|
| 1822 |
|
| 1823 |
|
| 1824 |
custom_head = """
|
| 1825 |
+
<script>
|
| 1826 |
+
(function () {
|
| 1827 |
+
var mode = "dark";
|
| 1828 |
+
try {
|
| 1829 |
+
var stored = localStorage.getItem("inferbench-theme");
|
| 1830 |
+
if (stored === "light" || stored === "dark") mode = stored;
|
| 1831 |
+
else {
|
| 1832 |
+
var param = new URLSearchParams(location.search).get("__theme");
|
| 1833 |
+
if (param === "light" || param === "dark") mode = param;
|
| 1834 |
+
}
|
| 1835 |
+
} catch (e) {}
|
| 1836 |
+
document.documentElement.classList.toggle("dark", mode === "dark");
|
| 1837 |
+
document.documentElement.dataset.theme = mode;
|
| 1838 |
+
})();
|
| 1839 |
+
</script>
|
| 1840 |
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
| 1841 |
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
| 1842 |
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet" />
|
| 1843 |
<script>
|
| 1844 |
+
(() => {
|
| 1845 |
+
const STORAGE_KEY = "inferbench-theme";
|
| 1846 |
+
const PLOT_LAYOUT = {
|
| 1847 |
+
dark: {
|
| 1848 |
+
paper_bgcolor: "#171021",
|
| 1849 |
+
plot_bgcolor: "#1d1429",
|
| 1850 |
+
"font.color": "#d4d4d4",
|
| 1851 |
+
"legend.font.color": "#d4d4d4",
|
| 1852 |
+
"xaxis.gridcolor": "rgba(74, 57, 98, 0.55)",
|
| 1853 |
+
"xaxis.color": "#d4d4d4",
|
| 1854 |
+
"xaxis.title.font.color": "#fafafa",
|
| 1855 |
+
"xaxis.tickfont.color": "#a3a3a3",
|
| 1856 |
+
"yaxis.gridcolor": "rgba(74, 57, 98, 0.55)",
|
| 1857 |
+
"yaxis.color": "#d4d4d4",
|
| 1858 |
+
"yaxis.title.font.color": "#fafafa",
|
| 1859 |
+
"yaxis.tickfont.color": "#a3a3a3",
|
| 1860 |
+
},
|
| 1861 |
+
light: {
|
| 1862 |
+
paper_bgcolor: "#f6f3fa",
|
| 1863 |
+
plot_bgcolor: "#ffffff",
|
| 1864 |
+
"font.color": "#3f3f46",
|
| 1865 |
+
"legend.font.color": "#3f3f46",
|
| 1866 |
+
"xaxis.gridcolor": "rgba(126, 34, 206, 0.12)",
|
| 1867 |
+
"xaxis.color": "#3f3f46",
|
| 1868 |
+
"xaxis.title.font.color": "#18181b",
|
| 1869 |
+
"xaxis.tickfont.color": "#71717a",
|
| 1870 |
+
"yaxis.gridcolor": "rgba(126, 34, 206, 0.12)",
|
| 1871 |
+
"yaxis.color": "#3f3f46",
|
| 1872 |
+
"yaxis.title.font.color": "#18181b",
|
| 1873 |
+
"yaxis.tickfont.color": "#71717a",
|
| 1874 |
+
},
|
| 1875 |
+
};
|
| 1876 |
+
|
| 1877 |
+
const currentMode = () => {
|
| 1878 |
+
try {
|
| 1879 |
+
const stored = localStorage.getItem(STORAGE_KEY);
|
| 1880 |
+
if (stored === "light" || stored === "dark") return stored;
|
| 1881 |
+
} catch (e) {}
|
| 1882 |
+
const param = new URLSearchParams(location.search).get("__theme");
|
| 1883 |
+
if (param === "light" || param === "dark") return param;
|
| 1884 |
+
return "dark";
|
| 1885 |
+
};
|
| 1886 |
+
|
| 1887 |
+
const queryAll = (selector) => {
|
| 1888 |
+
const found = [...document.querySelectorAll(selector)];
|
| 1889 |
+
document.querySelectorAll("gradio-app").forEach((app) => {
|
| 1890 |
+
if (app.shadowRoot) found.push(...app.shadowRoot.querySelectorAll(selector));
|
| 1891 |
+
});
|
| 1892 |
+
return found;
|
| 1893 |
+
};
|
| 1894 |
+
|
| 1895 |
+
const restylePlots = (mode) => {
|
| 1896 |
+
const layout = PLOT_LAYOUT[mode];
|
| 1897 |
+
if (!layout || typeof Plotly === "undefined") return;
|
| 1898 |
+
queryAll(".js-plotly-plot").forEach((gd) => {
|
| 1899 |
+
try { Plotly.relayout(gd, layout); } catch (e) {}
|
| 1900 |
+
});
|
| 1901 |
+
};
|
| 1902 |
+
|
| 1903 |
+
const applyMode = (mode, persist) => {
|
| 1904 |
+
const dark = mode === "dark";
|
| 1905 |
+
const targets = [
|
| 1906 |
+
document.documentElement,
|
| 1907 |
+
document.body,
|
| 1908 |
+
...queryAll(".gradio-container"),
|
| 1909 |
+
...document.querySelectorAll("gradio-app"),
|
| 1910 |
+
].filter(Boolean);
|
| 1911 |
+
targets.forEach((el) => {
|
| 1912 |
+
el.classList.toggle("dark", dark);
|
| 1913 |
+
el.classList.toggle("light", !dark);
|
| 1914 |
+
});
|
| 1915 |
+
document.documentElement.dataset.theme = mode;
|
| 1916 |
+
const label = dark ? "Switch to light mode" : "Switch to dark mode";
|
| 1917 |
+
queryAll(".theme-toggle").forEach((btn) => {
|
| 1918 |
+
btn.setAttribute("data-mode", mode);
|
| 1919 |
+
btn.setAttribute("aria-label", label);
|
| 1920 |
+
btn.setAttribute("title", label);
|
| 1921 |
+
});
|
| 1922 |
+
if (persist) {
|
| 1923 |
+
try { localStorage.setItem(STORAGE_KEY, mode); } catch (e) {}
|
| 1924 |
+
try {
|
| 1925 |
+
const url = new URL(location.href);
|
| 1926 |
+
url.searchParams.set("__theme", mode);
|
| 1927 |
+
history.replaceState(null, "", url);
|
| 1928 |
+
} catch (e) {}
|
| 1929 |
+
}
|
| 1930 |
+
restylePlots(mode);
|
| 1931 |
+
};
|
| 1932 |
+
|
| 1933 |
+
applyMode(currentMode(), false);
|
| 1934 |
+
|
| 1935 |
+
document.addEventListener("click", (event) => {
|
| 1936 |
+
const path = typeof event.composedPath === "function" ? event.composedPath() : [event.target];
|
| 1937 |
+
const btn = path.find((el) => el.classList && el.classList.contains("theme-toggle"));
|
| 1938 |
+
if (!btn) return;
|
| 1939 |
+
event.preventDefault();
|
| 1940 |
+
const next = currentMode() === "dark" ? "light" : "dark";
|
| 1941 |
+
applyMode(next, true);
|
| 1942 |
+
});
|
| 1943 |
+
|
| 1944 |
+
const sync = () => applyMode(currentMode(), false);
|
| 1945 |
+
document.addEventListener("DOMContentLoaded", sync);
|
| 1946 |
+
window.addEventListener("load", () => {
|
| 1947 |
+
sync();
|
| 1948 |
+
setTimeout(sync, 80);
|
| 1949 |
+
setTimeout(sync, 400);
|
| 1950 |
+
});
|
| 1951 |
+
|
| 1952 |
+
const startObserver = () => {
|
| 1953 |
+
if (!document.body || window.__inferbenchThemeObserver) return;
|
| 1954 |
+
window.__inferbenchThemeObserver = true;
|
| 1955 |
+
const onMutations = (mutations) => {
|
| 1956 |
+
const mode = currentMode();
|
| 1957 |
+
const isDark = document.documentElement.classList.contains("dark");
|
| 1958 |
+
const added = mutations.flatMap((mutation) => [...mutation.addedNodes]).filter((node) => node.nodeType === 1);
|
| 1959 |
+
const hasContainer = added.some((node) => (
|
| 1960 |
+
node.classList?.contains("gradio-container") ||
|
| 1961 |
+
node.querySelector?.(".gradio-container, .theme-toggle")
|
| 1962 |
+
));
|
| 1963 |
+
if ((mode === "dark") !== isDark || hasContainer) applyMode(mode, false);
|
| 1964 |
+
const hasPlot = added.some((node) => (
|
| 1965 |
+
node.classList?.contains("js-plotly-plot") ||
|
| 1966 |
+
node.querySelector?.(".js-plotly-plot")
|
| 1967 |
+
));
|
| 1968 |
+
if (hasPlot) restylePlots(mode);
|
| 1969 |
+
};
|
| 1970 |
+
new MutationObserver(onMutations).observe(document.body, { childList: true, subtree: true });
|
| 1971 |
+
document.querySelectorAll("gradio-app").forEach((app) => {
|
| 1972 |
+
if (app.shadowRoot) {
|
| 1973 |
+
new MutationObserver(onMutations).observe(app.shadowRoot, { childList: true, subtree: true });
|
| 1974 |
+
}
|
| 1975 |
+
});
|
| 1976 |
+
};
|
| 1977 |
+
if (document.body) startObserver();
|
| 1978 |
+
else document.addEventListener("DOMContentLoaded", startObserver);
|
| 1979 |
+
})();
|
| 1980 |
+
</script>
|
| 1981 |
+
<script>
|
| 1982 |
(() => {
|
| 1983 |
if (window.__inferbenchLeaderboardSortBound) return;
|
| 1984 |
window.__inferbenchLeaderboardSortBound = true;
|
ui.py
CHANGED
|
@@ -113,6 +113,15 @@ def render_header():
|
|
| 113 |
gr.HTML(
|
| 114 |
f"""
|
| 115 |
<header class="app-header">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 116 |
<div class="app-header-brand">
|
| 117 |
<img class="app-header-logo" src="{_MASCOT_DATA_URI}" alt="" />
|
| 118 |
<h1>InferBench</h1>
|
|
@@ -642,21 +651,23 @@ def render_compare_samples(benchmark):
|
|
| 642 |
gr.Markdown(
|
| 643 |
f"""
|
| 644 |
<p class="compare-samples-help">
|
| 645 |
-
Pick up to <strong>{MAX_COMPARE_MODELS}</strong> models
|
| 646 |
-
|
| 647 |
-
|
| 648 |
</p>
|
| 649 |
"""
|
| 650 |
)
|
| 651 |
-
with gr.Row(elem_classes="
|
| 652 |
model_picker = gr.Dropdown(
|
| 653 |
choices=models,
|
| 654 |
value=default_models,
|
| 655 |
multiselect=True,
|
| 656 |
max_choices=MAX_COMPARE_MODELS,
|
| 657 |
label="Models",
|
| 658 |
-
|
| 659 |
-
scale=
|
|
|
|
|
|
|
| 660 |
)
|
| 661 |
prompt_count = gr.Slider(
|
| 662 |
minimum=1,
|
|
@@ -664,9 +675,18 @@ def render_compare_samples(benchmark):
|
|
| 664 |
value=DEFAULT_COMPARE_PROMPTS,
|
| 665 |
step=1,
|
| 666 |
label="Prompts to show",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 667 |
scale=1,
|
|
|
|
|
|
|
| 668 |
)
|
| 669 |
-
shuffle_button = gr.Button("Shuffle prompts", scale=1)
|
| 670 |
|
| 671 |
gallery = gr.HTML(
|
| 672 |
value=_build_compare_samples_html(
|
|
@@ -1066,11 +1086,11 @@ def render_benchmark_graphs(benchmark):
|
|
| 1066 |
if price_figures or time_figures:
|
| 1067 |
gr.Markdown(
|
| 1068 |
"### Pareto frontiers\n\n"
|
| 1069 |
-
"<span
|
| 1070 |
"Green = on the frontier (lower cost or time at the same or better score). "
|
| 1071 |
"Lavender = below the frontier."
|
| 1072 |
"</span><br/>"
|
| 1073 |
-
"<strong
|
| 1074 |
)
|
| 1075 |
with gr.Row(equal_height=False):
|
| 1076 |
with gr.Column(scale=1, min_width=320):
|
|
|
|
| 113 |
gr.HTML(
|
| 114 |
f"""
|
| 115 |
<header class="app-header">
|
| 116 |
+
<button type="button" class="theme-toggle" data-mode="dark" aria-label="Switch to light mode" title="Switch to light mode">
|
| 117 |
+
<svg class="theme-icon-sun" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
|
| 118 |
+
<circle cx="12" cy="12" r="4"></circle>
|
| 119 |
+
<path d="M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M4.93 19.07l1.41-1.41M17.66 6.34l1.41-1.41"></path>
|
| 120 |
+
</svg>
|
| 121 |
+
<svg class="theme-icon-moon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
|
| 122 |
+
<path d="M21 14.5A8.5 8.5 0 1 1 9.5 3 7 7 0 0 0 21 14.5z"></path>
|
| 123 |
+
</svg>
|
| 124 |
+
</button>
|
| 125 |
<div class="app-header-brand">
|
| 126 |
<img class="app-header-logo" src="{_MASCOT_DATA_URI}" alt="" />
|
| 127 |
<h1>InferBench</h1>
|
|
|
|
| 651 |
gr.Markdown(
|
| 652 |
f"""
|
| 653 |
<p class="compare-samples-help">
|
| 654 |
+
Pick up to <strong>{MAX_COMPARE_MODELS}</strong> models to compare side by
|
| 655 |
+
side. Images come from the public generation URLs for this benchmark.
|
| 656 |
+
Prompts to show chooses how many shared prompts appear (1–{MAX_COMPARE_PROMPTS}).
|
| 657 |
</p>
|
| 658 |
"""
|
| 659 |
)
|
| 660 |
+
with gr.Row(elem_classes="compare-controls"):
|
| 661 |
model_picker = gr.Dropdown(
|
| 662 |
choices=models,
|
| 663 |
value=default_models,
|
| 664 |
multiselect=True,
|
| 665 |
max_choices=MAX_COMPARE_MODELS,
|
| 666 |
label="Models",
|
| 667 |
+
container=False,
|
| 668 |
+
scale=4,
|
| 669 |
+
min_width=280,
|
| 670 |
+
elem_classes="compare-models",
|
| 671 |
)
|
| 672 |
prompt_count = gr.Slider(
|
| 673 |
minimum=1,
|
|
|
|
| 675 |
value=DEFAULT_COMPARE_PROMPTS,
|
| 676 |
step=1,
|
| 677 |
label="Prompts to show",
|
| 678 |
+
container=False,
|
| 679 |
+
show_reset_button=False,
|
| 680 |
+
scale=1,
|
| 681 |
+
min_width=180,
|
| 682 |
+
elem_classes="compare-prompt-count",
|
| 683 |
+
)
|
| 684 |
+
shuffle_button = gr.Button(
|
| 685 |
+
"Shuffle prompts",
|
| 686 |
scale=1,
|
| 687 |
+
min_width=140,
|
| 688 |
+
elem_classes="compare-shuffle",
|
| 689 |
)
|
|
|
|
| 690 |
|
| 691 |
gallery = gr.HTML(
|
| 692 |
value=_build_compare_samples_html(
|
|
|
|
| 1086 |
if price_figures or time_figures:
|
| 1087 |
gr.Markdown(
|
| 1088 |
"### Pareto frontiers\n\n"
|
| 1089 |
+
"<span class='pareto-help'>"
|
| 1090 |
"Green = on the frontier (lower cost or time at the same or better score). "
|
| 1091 |
"Lavender = below the frontier."
|
| 1092 |
"</span><br/>"
|
| 1093 |
+
"<strong class='pareto-help-emphasis'>Hover a point to see which model it is.</strong>"
|
| 1094 |
)
|
| 1095 |
with gr.Row(equal_height=False):
|
| 1096 |
with gr.Column(scale=1, min_width=320):
|