Spaces:
Running
Running
Minette Kaunismäki commited on
Commit ·
baa43b9
1
Parent(s): d5590eb
cleaning css
Browse files
app.py
CHANGED
|
@@ -34,7 +34,6 @@ custom_css = """
|
|
| 34 |
--pruna-accent: #9334e9;
|
| 35 |
--pruna-accent-bright: #8f35ff;
|
| 36 |
--pruna-lavender: #d8b4fe;
|
| 37 |
-
--pruna-green: #69a45c;
|
| 38 |
--pruna-link: #bf8bff;
|
| 39 |
--pruna-font: "Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;
|
| 40 |
}
|
|
@@ -59,20 +58,48 @@ body, .gradio-container {
|
|
| 59 |
}
|
| 60 |
|
| 61 |
/* —— App header (InferBench only) —— */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 62 |
.app-header {
|
| 63 |
display: flex;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 64 |
align-items: center;
|
| 65 |
justify-content: center;
|
| 66 |
-
gap:
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
}
|
| 71 |
.app-header-logo {
|
| 72 |
-
|
| 73 |
-
|
|
|
|
|
|
|
| 74 |
object-fit: contain;
|
| 75 |
-
flex
|
| 76 |
}
|
| 77 |
|
| 78 |
/* —— Page tabs: centered underline nav (Gradio 5 uses tab-wrapper/container) —— */
|
|
@@ -123,6 +150,10 @@ body, .gradio-container {
|
|
| 123 |
background: var(--pruna-accent-bright) !important;
|
| 124 |
height: 2px !important;
|
| 125 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
| 126 |
|
| 127 |
/* —— Benchmark view menu (Leaderboard / Graphs / Compare) —— */
|
| 128 |
.benchmark-back-btn,
|
|
@@ -297,6 +328,9 @@ body, .gradio-container {
|
|
| 297 |
box-shadow: none !important;
|
| 298 |
padding: 0 !important;
|
| 299 |
margin: 0 !important;
|
|
|
|
|
|
|
|
|
|
| 300 |
}
|
| 301 |
.page-footer {
|
| 302 |
margin: 32px 0 16px;
|
|
@@ -388,11 +422,35 @@ body, .gradio-container {
|
|
| 388 |
overflow-x: auto;
|
| 389 |
}
|
| 390 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 391 |
.home-callouts {
|
| 392 |
display: grid;
|
| 393 |
grid-template-columns: repeat(3, minmax(0, 1fr));
|
| 394 |
gap: 12px;
|
| 395 |
-
margin: 8px 0
|
|
|
|
| 396 |
}
|
| 397 |
.home-callouts > div {
|
| 398 |
padding: 14px 16px;
|
|
@@ -422,12 +480,15 @@ body, .gradio-container {
|
|
| 422 |
box-shadow: none !important;
|
| 423 |
padding: 0 !important;
|
| 424 |
margin: 0 !important;
|
|
|
|
|
|
|
|
|
|
| 425 |
}
|
| 426 |
.home-snapshots-table {
|
| 427 |
display: table !important;
|
| 428 |
width: 100% !important;
|
| 429 |
border-collapse: separate !important;
|
| 430 |
-
border-spacing:
|
| 431 |
margin: 0 !important;
|
| 432 |
table-layout: fixed !important;
|
| 433 |
border: none !important;
|
|
@@ -447,6 +508,9 @@ body, .gradio-container {
|
|
| 447 |
border: 0 !important;
|
| 448 |
background: transparent !important;
|
| 449 |
}
|
|
|
|
|
|
|
|
|
|
| 450 |
.home-snap-title,
|
| 451 |
.prose .home-snap-title {
|
| 452 |
display: flex !important;
|
|
@@ -514,7 +578,9 @@ body, .gradio-container {
|
|
| 514 |
margin: 4px 0 8px;
|
| 515 |
border-spacing: 0;
|
| 516 |
}
|
| 517 |
-
.home-snapshots-table td.home-snap-cell
|
|
|
|
|
|
|
| 518 |
margin-bottom: 8px;
|
| 519 |
}
|
| 520 |
.home-snap-top {
|
|
@@ -554,11 +620,6 @@ body, .gradio-container {
|
|
| 554 |
|
| 555 |
@media (max-width: 700px) {
|
| 556 |
.home-callouts { grid-template-columns: 1fr; }
|
| 557 |
-
.app-header {
|
| 558 |
-
flex-direction: column;
|
| 559 |
-
text-align: center;
|
| 560 |
-
}
|
| 561 |
-
.app-header-copy { text-align: center; }
|
| 562 |
}
|
| 563 |
|
| 564 |
.pareto-plot { width: 100%; }
|
|
@@ -567,31 +628,6 @@ body, .gradio-container {
|
|
| 567 |
.pareto-plot .plot-container { width: 100% !important; }
|
| 568 |
.pareto-plot .modebar { display: none !important; }
|
| 569 |
|
| 570 |
-
.leaderboard-summary {
|
| 571 |
-
display: grid;
|
| 572 |
-
grid-template-columns: repeat(4, minmax(0, 1fr));
|
| 573 |
-
gap: 12px;
|
| 574 |
-
margin: 8px 0 16px;
|
| 575 |
-
}
|
| 576 |
-
.leaderboard-summary > div {
|
| 577 |
-
padding: 14px 16px;
|
| 578 |
-
border: 1px solid color-mix(in oklab, var(--pruna-border) 60%, transparent);
|
| 579 |
-
border-radius: 12px;
|
| 580 |
-
background: color-mix(in oklab, var(--pruna-bg-card) 82%, black 18%);
|
| 581 |
-
}
|
| 582 |
-
.leaderboard-summary span,
|
| 583 |
-
.results-heading {
|
| 584 |
-
color: var(--pruna-text-muted);
|
| 585 |
-
font-size: 11px;
|
| 586 |
-
font-weight: 700;
|
| 587 |
-
letter-spacing: 0.05em;
|
| 588 |
-
}
|
| 589 |
-
.leaderboard-summary strong {
|
| 590 |
-
display: block;
|
| 591 |
-
margin-top: 4px;
|
| 592 |
-
color: var(--pruna-text-primary);
|
| 593 |
-
font-size: 22px;
|
| 594 |
-
}
|
| 595 |
.leaderboard-controls {
|
| 596 |
align-items: end !important;
|
| 597 |
gap: 10px !important;
|
|
@@ -674,12 +710,6 @@ body, .gradio-container {
|
|
| 674 |
width: 100% !important;
|
| 675 |
--block-border-width: 0 !important;
|
| 676 |
}
|
| 677 |
-
.results-heading {
|
| 678 |
-
display: flex;
|
| 679 |
-
justify-content: space-between;
|
| 680 |
-
margin: 16px 0 8px;
|
| 681 |
-
text-transform: uppercase;
|
| 682 |
-
}
|
| 683 |
.ranking-table-scroll {
|
| 684 |
border: 1px solid rgba(255, 255, 255, 0.08);
|
| 685 |
border-radius: 12px;
|
|
@@ -885,29 +915,41 @@ body, .gradio-container {
|
|
| 885 |
text-align: center;
|
| 886 |
}
|
| 887 |
|
| 888 |
-
@media (max-width: 700px) {
|
| 889 |
-
.leaderboard-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
|
| 890 |
-
}
|
| 891 |
-
|
| 892 |
/*
|
| 893 |
Type scale (playground-like):
|
| 894 |
product title > page h1 > section h2/h3 > meta labels > body
|
| 895 |
Uppercase lavender is reserved for meta labels only — not section titles.
|
| 896 |
*/
|
| 897 |
-
.app-header-
|
| 898 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 899 |
font-size: clamp(1.9rem, 3vw, 2.4rem) !important;
|
| 900 |
font-weight: 700 !important;
|
| 901 |
letter-spacing: -0.035em;
|
| 902 |
-
line-height: 1
|
| 903 |
color: #ffffff !important;
|
| 904 |
}
|
| 905 |
-
.app-header-
|
| 906 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 907 |
color: var(--pruna-text-muted) !important;
|
| 908 |
font-size: 0.95rem !important;
|
| 909 |
-
line-height: 1.45;
|
| 910 |
-
font-weight: 400;
|
| 911 |
}
|
| 912 |
|
| 913 |
.gradio-container h1,
|
|
@@ -959,12 +1001,6 @@ body, .gradio-container {
|
|
| 959 |
text-transform: none !important;
|
| 960 |
}
|
| 961 |
|
| 962 |
-
/* Brand header wins over generic h1 rules */
|
| 963 |
-
.app-header .app-header-copy h1 {
|
| 964 |
-
font-size: clamp(1.9rem, 3vw, 2.4rem) !important;
|
| 965 |
-
margin: 0 !important;
|
| 966 |
-
}
|
| 967 |
-
|
| 968 |
.markdown p, .md p, .prose p,
|
| 969 |
.gradio-container .markdown p {
|
| 970 |
margin: 0 0 0.8rem !important;
|
|
@@ -973,6 +1009,31 @@ body, .gradio-container {
|
|
| 973 |
font-weight: 400 !important;
|
| 974 |
line-height: 1.55 !important;
|
| 975 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 976 |
.markdown li, .md li, .prose li {
|
| 977 |
color: var(--pruna-text-body) !important;
|
| 978 |
font-size: 0.95rem;
|
|
@@ -1422,7 +1483,7 @@ benchmarks = [
|
|
| 1422 |
"title": "OneIG Alignment",
|
| 1423 |
"emoji": "🎯",
|
| 1424 |
"card_description": (
|
| 1425 |
-
"Anime/stylization, portrait, and general-object alignment prompts
|
| 1426 |
"alignment scores and Datapoint Elo (not the full OneIG suite), plus "
|
| 1427 |
"side-by-side generations."
|
| 1428 |
),
|
|
@@ -1435,8 +1496,6 @@ benchmarks = [
|
|
| 1435 |
"columns": oneig_display_columns,
|
| 1436 |
"score_columns": oneig_metric_columns,
|
| 1437 |
"overall_column": "OneIG Overall Score",
|
| 1438 |
-
"best_score_label": "BEST ONEIG ALIGNMENT",
|
| 1439 |
-
"metrics_same_scale": True,
|
| 1440 |
"note": (
|
| 1441 |
"> Rankings are ordered by the mean of the available alignment category "
|
| 1442 |
"scores. Missing category scores are not included in that model's mean."
|
|
@@ -1460,8 +1519,6 @@ benchmarks = [
|
|
| 1460 |
"columns": qwen_display_columns,
|
| 1461 |
"score_columns": qwen_score_columns,
|
| 1462 |
"overall_column": qwen_overall_column,
|
| 1463 |
-
"best_score_label": "BEST DATAPOINT ELO",
|
| 1464 |
-
"metrics_same_scale": False,
|
| 1465 |
"note": (
|
| 1466 |
"> Models are ordered by Datapoint Elo when available. Other metric "
|
| 1467 |
"columns come from the P-Judge and Rapidata evaluations on the same "
|
|
|
|
| 34 |
--pruna-accent: #9334e9;
|
| 35 |
--pruna-accent-bright: #8f35ff;
|
| 36 |
--pruna-lavender: #d8b4fe;
|
|
|
|
| 37 |
--pruna-link: #bf8bff;
|
| 38 |
--pruna-font: "Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;
|
| 39 |
}
|
|
|
|
| 58 |
}
|
| 59 |
|
| 60 |
/* —— App header (InferBench only) —— */
|
| 61 |
+
.app-header-host,
|
| 62 |
+
.app-header-host .html-container,
|
| 63 |
+
.app-header-host .prose,
|
| 64 |
+
.app-header-host.block,
|
| 65 |
+
.app-header-host .padded {
|
| 66 |
+
border: none !important;
|
| 67 |
+
background: transparent !important;
|
| 68 |
+
box-shadow: none !important;
|
| 69 |
+
padding: 0 !important;
|
| 70 |
+
margin: 0 auto !important;
|
| 71 |
+
width: 100% !important;
|
| 72 |
+
max-width: none !important;
|
| 73 |
+
display: block !important;
|
| 74 |
+
text-align: center !important;
|
| 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 0 0;
|
| 84 |
+
text-align: center;
|
| 85 |
+
}
|
| 86 |
+
.app-header-brand {
|
| 87 |
+
display: inline-flex !important;
|
| 88 |
+
flex-direction: row;
|
| 89 |
align-items: center;
|
| 90 |
justify-content: center;
|
| 91 |
+
gap: 12px;
|
| 92 |
+
width: max-content !important;
|
| 93 |
+
max-width: 100%;
|
| 94 |
+
margin: 0 auto;
|
| 95 |
}
|
| 96 |
.app-header-logo {
|
| 97 |
+
display: block !important;
|
| 98 |
+
width: 44px !important;
|
| 99 |
+
height: 52px !important;
|
| 100 |
+
margin: 0 !important;
|
| 101 |
object-fit: contain;
|
| 102 |
+
flex: 0 0 auto;
|
| 103 |
}
|
| 104 |
|
| 105 |
/* —— Page tabs: centered underline nav (Gradio 5 uses tab-wrapper/container) —— */
|
|
|
|
| 150 |
background: var(--pruna-accent-bright) !important;
|
| 151 |
height: 2px !important;
|
| 152 |
}
|
| 153 |
+
.main-tabs .tabitem {
|
| 154 |
+
padding: 8px 0 0 !important;
|
| 155 |
+
border-radius: 0 !important;
|
| 156 |
+
}
|
| 157 |
|
| 158 |
/* —— Benchmark view menu (Leaderboard / Graphs / Compare) —— */
|
| 159 |
.benchmark-back-btn,
|
|
|
|
| 328 |
box-shadow: none !important;
|
| 329 |
padding: 0 !important;
|
| 330 |
margin: 0 !important;
|
| 331 |
+
width: 100% !important;
|
| 332 |
+
max-width: none !important;
|
| 333 |
+
overflow: visible !important;
|
| 334 |
}
|
| 335 |
.page-footer {
|
| 336 |
margin: 32px 0 16px;
|
|
|
|
| 422 |
overflow-x: auto;
|
| 423 |
}
|
| 424 |
|
| 425 |
+
.home-callouts-host,
|
| 426 |
+
.home-callouts-host .html-container,
|
| 427 |
+
.home-callouts-host .prose,
|
| 428 |
+
.home-callouts-host.block,
|
| 429 |
+
.home-callouts-host .padded,
|
| 430 |
+
.home-section-title,
|
| 431 |
+
.home-section-title.block,
|
| 432 |
+
.home-section-title .prose,
|
| 433 |
+
.home-section-title.padded {
|
| 434 |
+
border: none !important;
|
| 435 |
+
background: transparent !important;
|
| 436 |
+
box-shadow: none !important;
|
| 437 |
+
padding: 0 !important;
|
| 438 |
+
margin: 0 !important;
|
| 439 |
+
width: 100% !important;
|
| 440 |
+
max-width: none !important;
|
| 441 |
+
overflow: visible !important;
|
| 442 |
+
}
|
| 443 |
+
.home-section-title h2,
|
| 444 |
+
.home-section-title .prose h2,
|
| 445 |
+
.gradio-container .home-section-title h2 {
|
| 446 |
+
margin: 1.25rem 0 0.6rem !important;
|
| 447 |
+
}
|
| 448 |
.home-callouts {
|
| 449 |
display: grid;
|
| 450 |
grid-template-columns: repeat(3, minmax(0, 1fr));
|
| 451 |
gap: 12px;
|
| 452 |
+
margin: 8px 0 8px;
|
| 453 |
+
width: 100%;
|
| 454 |
}
|
| 455 |
.home-callouts > div {
|
| 456 |
padding: 14px 16px;
|
|
|
|
| 480 |
box-shadow: none !important;
|
| 481 |
padding: 0 !important;
|
| 482 |
margin: 0 !important;
|
| 483 |
+
width: 100% !important;
|
| 484 |
+
max-width: none !important;
|
| 485 |
+
overflow: visible !important;
|
| 486 |
}
|
| 487 |
.home-snapshots-table {
|
| 488 |
display: table !important;
|
| 489 |
width: 100% !important;
|
| 490 |
border-collapse: separate !important;
|
| 491 |
+
border-spacing: 0 12px !important;
|
| 492 |
margin: 0 !important;
|
| 493 |
table-layout: fixed !important;
|
| 494 |
border: none !important;
|
|
|
|
| 508 |
border: 0 !important;
|
| 509 |
background: transparent !important;
|
| 510 |
}
|
| 511 |
+
.home-snapshots-table td.home-snap-cell:first-child {
|
| 512 |
+
padding-right: 24px !important;
|
| 513 |
+
}
|
| 514 |
.home-snap-title,
|
| 515 |
.prose .home-snap-title {
|
| 516 |
display: flex !important;
|
|
|
|
| 578 |
margin: 4px 0 8px;
|
| 579 |
border-spacing: 0;
|
| 580 |
}
|
| 581 |
+
.home-snapshots-table td.home-snap-cell,
|
| 582 |
+
.home-snapshots-table td.home-snap-cell:first-child {
|
| 583 |
+
padding: 0 !important;
|
| 584 |
margin-bottom: 8px;
|
| 585 |
}
|
| 586 |
.home-snap-top {
|
|
|
|
| 620 |
|
| 621 |
@media (max-width: 700px) {
|
| 622 |
.home-callouts { grid-template-columns: 1fr; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 623 |
}
|
| 624 |
|
| 625 |
.pareto-plot { width: 100%; }
|
|
|
|
| 628 |
.pareto-plot .plot-container { width: 100% !important; }
|
| 629 |
.pareto-plot .modebar { display: none !important; }
|
| 630 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 631 |
.leaderboard-controls {
|
| 632 |
align-items: end !important;
|
| 633 |
gap: 10px !important;
|
|
|
|
| 710 |
width: 100% !important;
|
| 711 |
--block-border-width: 0 !important;
|
| 712 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 713 |
.ranking-table-scroll {
|
| 714 |
border: 1px solid rgba(255, 255, 255, 0.08);
|
| 715 |
border-radius: 12px;
|
|
|
|
| 915 |
text-align: center;
|
| 916 |
}
|
| 917 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 918 |
/*
|
| 919 |
Type scale (playground-like):
|
| 920 |
product title > page h1 > section h2/h3 > meta labels > body
|
| 921 |
Uppercase lavender is reserved for meta labels only — not section titles.
|
| 922 |
*/
|
| 923 |
+
.app-header-brand h1,
|
| 924 |
+
.prose .app-header-brand h1,
|
| 925 |
+
.gradio-container .app-header-brand h1,
|
| 926 |
+
.app-header .app-header-brand h1 {
|
| 927 |
+
display: block !important;
|
| 928 |
+
width: max-content !important;
|
| 929 |
+
max-width: none !important;
|
| 930 |
+
flex: 0 0 auto !important;
|
| 931 |
+
margin: 0 !important;
|
| 932 |
+
padding: 0 !important;
|
| 933 |
+
text-align: center !important;
|
| 934 |
font-size: clamp(1.9rem, 3vw, 2.4rem) !important;
|
| 935 |
font-weight: 700 !important;
|
| 936 |
letter-spacing: -0.035em;
|
| 937 |
+
line-height: 1 !important;
|
| 938 |
color: #ffffff !important;
|
| 939 |
}
|
| 940 |
+
.app-header-tagline,
|
| 941 |
+
.prose .app-header-tagline,
|
| 942 |
+
.gradio-container .app-header-tagline,
|
| 943 |
+
.prose p.app-header-tagline {
|
| 944 |
+
display: block !important;
|
| 945 |
+
width: 100% !important;
|
| 946 |
+
margin: 8px 0 0 !important;
|
| 947 |
+
padding: 0 !important;
|
| 948 |
+
text-align: center !important;
|
| 949 |
color: var(--pruna-text-muted) !important;
|
| 950 |
font-size: 0.95rem !important;
|
| 951 |
+
line-height: 1.45 !important;
|
| 952 |
+
font-weight: 400 !important;
|
| 953 |
}
|
| 954 |
|
| 955 |
.gradio-container h1,
|
|
|
|
| 1001 |
text-transform: none !important;
|
| 1002 |
}
|
| 1003 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1004 |
.markdown p, .md p, .prose p,
|
| 1005 |
.gradio-container .markdown p {
|
| 1006 |
margin: 0 0 0.8rem !important;
|
|
|
|
| 1009 |
font-weight: 400 !important;
|
| 1010 |
line-height: 1.55 !important;
|
| 1011 |
}
|
| 1012 |
+
.home-intro,
|
| 1013 |
+
.home-intro.block,
|
| 1014 |
+
.home-intro .prose,
|
| 1015 |
+
.home-intro.prose,
|
| 1016 |
+
.home-intro.padded {
|
| 1017 |
+
border: none !important;
|
| 1018 |
+
background: transparent !important;
|
| 1019 |
+
box-shadow: none !important;
|
| 1020 |
+
padding: 0 !important;
|
| 1021 |
+
margin: 0 auto 12px !important;
|
| 1022 |
+
max-width: 42rem;
|
| 1023 |
+
width: 100%;
|
| 1024 |
+
text-align: center;
|
| 1025 |
+
overflow: visible !important;
|
| 1026 |
+
}
|
| 1027 |
+
.home-intro p,
|
| 1028 |
+
.home-intro .prose p,
|
| 1029 |
+
.gradio-container .home-intro p {
|
| 1030 |
+
color: #e4e4e7 !important;
|
| 1031 |
+
font-size: 1.08rem !important;
|
| 1032 |
+
font-weight: 400 !important;
|
| 1033 |
+
line-height: 1.65 !important;
|
| 1034 |
+
margin: 0 auto 0.7rem !important;
|
| 1035 |
+
text-align: center !important;
|
| 1036 |
+
}
|
| 1037 |
.markdown li, .md li, .prose li {
|
| 1038 |
color: var(--pruna-text-body) !important;
|
| 1039 |
font-size: 0.95rem;
|
|
|
|
| 1483 |
"title": "OneIG Alignment",
|
| 1484 |
"emoji": "🎯",
|
| 1485 |
"card_description": (
|
| 1486 |
+
"Anime/stylization, portrait, and general-object alignment prompts: "
|
| 1487 |
"alignment scores and Datapoint Elo (not the full OneIG suite), plus "
|
| 1488 |
"side-by-side generations."
|
| 1489 |
),
|
|
|
|
| 1496 |
"columns": oneig_display_columns,
|
| 1497 |
"score_columns": oneig_metric_columns,
|
| 1498 |
"overall_column": "OneIG Overall Score",
|
|
|
|
|
|
|
| 1499 |
"note": (
|
| 1500 |
"> Rankings are ordered by the mean of the available alignment category "
|
| 1501 |
"scores. Missing category scores are not included in that model's mean."
|
|
|
|
| 1519 |
"columns": qwen_display_columns,
|
| 1520 |
"score_columns": qwen_score_columns,
|
| 1521 |
"overall_column": qwen_overall_column,
|
|
|
|
|
|
|
| 1522 |
"note": (
|
| 1523 |
"> Models are ordered by Datapoint Elo when available. Other metric "
|
| 1524 |
"columns come from the P-Judge and Rapidata evaluations on the same "
|
ui.py
CHANGED
|
@@ -16,100 +16,10 @@ _MASCOT_DATA_URI = (
|
|
| 16 |
)
|
| 17 |
|
| 18 |
|
| 19 |
-
FILTER_COLUMNS = ["Platform", "Endpoint Owner", "Model", "Optimized"]
|
| 20 |
MAX_COMPARE_MODELS = 4
|
| 21 |
DEFAULT_COMPARE_PROMPTS = 3
|
| 22 |
MAX_COMPARE_PROMPTS = 8
|
| 23 |
|
| 24 |
-
ALL_LEADERBOARD_NOTE = """
|
| 25 |
-
> **💡 Note:** Each efficiency metric and quality metric captures only one dimension of
|
| 26 |
-
> model capacity. Rankings may vary when considering other metrics. "Endpoint Owner"
|
| 27 |
-
> refers to the publisher of the evaluated endpoint and may differ from the original
|
| 28 |
-
> model creator. "Optimized" indicates that the endpoint uses an explicit optimization
|
| 29 |
-
> mode or serves a modified/accelerated variant.
|
| 30 |
-
"""
|
| 31 |
-
|
| 32 |
-
ONEIG_SCORES_CONTENT = """
|
| 33 |
-
### Reported OneIG scores
|
| 34 |
-
|
| 35 |
-
- **Anime Alignment** — alignment for anime and stylization prompts
|
| 36 |
-
- **Human Alignment** — alignment for portrait prompts
|
| 37 |
-
- **Object Alignment** — alignment for general-object prompts
|
| 38 |
-
|
| 39 |
-
The leaderboard's **OneIG Overall Score** is the mean of each model's available
|
| 40 |
-
category scores.
|
| 41 |
-
"""
|
| 42 |
-
|
| 43 |
-
ONEIG_RUN_DETAILS_CONTENT = """
|
| 44 |
-
### Reading the results
|
| 45 |
-
|
| 46 |
-
Each row records the evaluation date, generation time, price per image, and links to
|
| 47 |
-
the source evaluation runs when available. Use the filters in the leaderboard to
|
| 48 |
-
compare providers, models, and optimized variants.
|
| 49 |
-
"""
|
| 50 |
-
|
| 51 |
-
P_JUDGE_SCORES_CONTENT = """
|
| 52 |
-
### Reported P-Judge scores
|
| 53 |
-
|
| 54 |
-
- **P-Judge Overall** — automatic preference / quality score for generated images
|
| 55 |
-
|
| 56 |
-
Higher scores indicate stronger performance on the P-Judge evaluation.
|
| 57 |
-
"""
|
| 58 |
-
|
| 59 |
-
P_JUDGE_RUN_DETAILS_CONTENT = """
|
| 60 |
-
### Reading the results
|
| 61 |
-
|
| 62 |
-
Each row records the evaluation date, generation time, and price per image when
|
| 63 |
-
available. Rankings are ordered by **P-Judge Overall**.
|
| 64 |
-
"""
|
| 65 |
-
|
| 66 |
-
DATAPOINT_ELO_SCORES_CONTENT = """
|
| 67 |
-
### Reported Datapoint Elo scores
|
| 68 |
-
|
| 69 |
-
- **Datapoint Elo** — human-preference Elo rating from pairwise comparisons
|
| 70 |
-
|
| 71 |
-
Elo values move whenever new models are added and re-evaluated against the field,
|
| 72 |
-
so the Date column reflects the leaderboard snapshot date.
|
| 73 |
-
"""
|
| 74 |
-
|
| 75 |
-
DATAPOINT_ELO_RUN_DETAILS_CONTENT = """
|
| 76 |
-
### Reading the results
|
| 77 |
-
|
| 78 |
-
Each row records the snapshot date, generation time, and price per image when
|
| 79 |
-
available. Rankings are ordered by **Datapoint Elo**.
|
| 80 |
-
"""
|
| 81 |
-
|
| 82 |
-
RAPIDATA_ELO_SCORES_CONTENT = """
|
| 83 |
-
### Reported Rapidata Elo scores
|
| 84 |
-
|
| 85 |
-
- **Rapidata Elo** — Elo rating from the Rapidata evaluation suite
|
| 86 |
-
|
| 87 |
-
Higher Elo indicates stronger relative performance on that suite.
|
| 88 |
-
"""
|
| 89 |
-
|
| 90 |
-
RAPIDATA_ELO_RUN_DETAILS_CONTENT = """
|
| 91 |
-
### Reading the results
|
| 92 |
-
|
| 93 |
-
Each row records generation time and price per image when available. Rankings are
|
| 94 |
-
ordered by **Rapidata Elo**.
|
| 95 |
-
"""
|
| 96 |
-
|
| 97 |
-
BENCHMARK_AI_ELO_SCORES_CONTENT = """
|
| 98 |
-
### Reported Benchmark.ai Elo scores
|
| 99 |
-
|
| 100 |
-
- **Benchmark.ai Elo** — Elo rating from the Benchmark.ai leaderboard
|
| 101 |
-
|
| 102 |
-
This score is not from the Qwen Image Bench prompt suite; it is shown alongside for
|
| 103 |
-
cross-benchmark comparison.
|
| 104 |
-
"""
|
| 105 |
-
|
| 106 |
-
BENCHMARK_AI_ELO_RUN_DETAILS_CONTENT = """
|
| 107 |
-
### Reading the results
|
| 108 |
-
|
| 109 |
-
Each row records generation time and price per image when available. Rankings for
|
| 110 |
-
this metric alone are ordered by **Benchmark.ai Elo**.
|
| 111 |
-
"""
|
| 112 |
-
|
| 113 |
ABOUT_OVERVIEW_CONTENT = """
|
| 114 |
# About InferBench
|
| 115 |
|
|
@@ -119,10 +29,10 @@ score.
|
|
| 119 |
|
| 120 |
## What you can do here
|
| 121 |
|
| 122 |
-
- **Home**
|
| 123 |
-
- **Benchmarks**
|
| 124 |
quality-vs-price Pareto frontier), and side-by-side sample generations.
|
| 125 |
-
- **About**
|
| 126 |
|
| 127 |
## Current prompt suites
|
| 128 |
|
|
@@ -141,15 +51,15 @@ skipped for that model).
|
|
| 141 |
### Qwen Image Bench
|
| 142 |
A shared prompt suite with multiple evaluation tracks shown as columns:
|
| 143 |
|
| 144 |
-
- **P-Judge Overall**
|
| 145 |
-
- **Datapoint Elo**
|
| 146 |
-
- **Rapidata Elo**
|
| 147 |
|
| 148 |
Plus latency and price metadata, and combined generations for visual comparison.
|
| 149 |
|
| 150 |
## How to read the numbers
|
| 151 |
|
| 152 |
-
Quality metrics from different suites are **not interchangeable**
|
| 153 |
Alignment score is not the same quantity as a Datapoint Elo. Prefer comparing models
|
| 154 |
*within* a benchmark column, and use price / generation time when you care about
|
| 155 |
efficiency.
|
|
@@ -165,7 +75,7 @@ ABOUT_DETAILS_CONTENT = """
|
|
| 165 |
in each table where available.
|
| 166 |
- Some models are missing individual metric columns; empty cells mean that track was
|
| 167 |
not run (or not reported) for that model.
|
| 168 |
-
- Elo ratings can shift when the comparison pool changes
|
| 169 |
rankings for the snapshot, not absolute constants.
|
| 170 |
- Optimized / accelerated endpoints (when labeled) may differ from the base model
|
| 171 |
publisher's default serving stack.
|
|
@@ -203,13 +113,15 @@ def render_header():
|
|
| 203 |
gr.HTML(
|
| 204 |
f"""
|
| 205 |
<header class="app-header">
|
| 206 |
-
<
|
| 207 |
-
|
| 208 |
<h1>InferBench</h1>
|
| 209 |
-
<p>Compare text-to-image models on quality, speed, and price</p>
|
| 210 |
</div>
|
|
|
|
| 211 |
</header>
|
| 212 |
-
"""
|
|
|
|
|
|
|
| 213 |
)
|
| 214 |
|
| 215 |
|
|
@@ -230,7 +142,7 @@ def _top_models(data, score_column, n=3):
|
|
| 230 |
|
| 231 |
|
| 232 |
def _home_highlights(benchmarks):
|
| 233 |
-
"""Quality leaders per suite
|
| 234 |
highlights = []
|
| 235 |
unique_models = set()
|
| 236 |
for benchmark in benchmarks:
|
|
@@ -272,10 +184,11 @@ def render_home(benchmarks):
|
|
| 272 |
|
| 273 |
gr.Markdown(
|
| 274 |
"""
|
| 275 |
-
InferBench
|
| 276 |
-
|
| 277 |
-
comparisons.
|
| 278 |
-
"""
|
|
|
|
| 279 |
)
|
| 280 |
|
| 281 |
if highlights:
|
|
@@ -285,9 +198,13 @@ def render_home(benchmarks):
|
|
| 285 |
f"<em>{escape(item['detail'])}</em></div>"
|
| 286 |
for item in highlights
|
| 287 |
]
|
| 288 |
-
gr.HTML(
|
|
|
|
|
|
|
|
|
|
|
|
|
| 289 |
|
| 290 |
-
gr.Markdown("## Benchmark snapshots")
|
| 291 |
title_cells = []
|
| 292 |
blurb_cells = []
|
| 293 |
top_cells = []
|
|
@@ -337,7 +254,7 @@ def render_home(benchmarks):
|
|
| 337 |
|
| 338 |
def _format_leaderboard_cell(column, value):
|
| 339 |
if pd.isna(value) or value is None or value == "":
|
| 340 |
-
return "
|
| 341 |
label = str(column).lower()
|
| 342 |
if label == "rank":
|
| 343 |
return str(int(value))
|
|
@@ -656,16 +573,12 @@ def _display_label(column):
|
|
| 656 |
return labels.get(column, column)
|
| 657 |
|
| 658 |
|
| 659 |
-
def _text_value(value):
|
| 660 |
-
return "—" if pd.isna(value) or value is None else escape(str(value))
|
| 661 |
-
|
| 662 |
-
|
| 663 |
def _format_score(value):
|
| 664 |
-
return "
|
| 665 |
|
| 666 |
|
| 667 |
def _format_price(value):
|
| 668 |
-
return "
|
| 669 |
|
| 670 |
|
| 671 |
def render_benchmark_detail(benchmark):
|
|
|
|
| 16 |
)
|
| 17 |
|
| 18 |
|
|
|
|
| 19 |
MAX_COMPARE_MODELS = 4
|
| 20 |
DEFAULT_COMPARE_PROMPTS = 3
|
| 21 |
MAX_COMPARE_PROMPTS = 8
|
| 22 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 23 |
ABOUT_OVERVIEW_CONTENT = """
|
| 24 |
# About InferBench
|
| 25 |
|
|
|
|
| 29 |
|
| 30 |
## What you can do here
|
| 31 |
|
| 32 |
+
- **Home**: snapshot of each prompt suite and unique model count.
|
| 33 |
+
- **Benchmarks**: open a prompt suite to see its metric columns, graphs (including a
|
| 34 |
quality-vs-price Pareto frontier), and side-by-side sample generations.
|
| 35 |
+
- **About**: this page.
|
| 36 |
|
| 37 |
## Current prompt suites
|
| 38 |
|
|
|
|
| 51 |
### Qwen Image Bench
|
| 52 |
A shared prompt suite with multiple evaluation tracks shown as columns:
|
| 53 |
|
| 54 |
+
- **P-Judge Overall**: automatic preference / quality score
|
| 55 |
+
- **Datapoint Elo**: human-preference Elo (default sort key)
|
| 56 |
+
- **Rapidata Elo**: Elo from the Rapidata evaluation on this suite
|
| 57 |
|
| 58 |
Plus latency and price metadata, and combined generations for visual comparison.
|
| 59 |
|
| 60 |
## How to read the numbers
|
| 61 |
|
| 62 |
+
Quality metrics from different suites are **not interchangeable**: a high OneIG
|
| 63 |
Alignment score is not the same quantity as a Datapoint Elo. Prefer comparing models
|
| 64 |
*within* a benchmark column, and use price / generation time when you care about
|
| 65 |
efficiency.
|
|
|
|
| 75 |
in each table where available.
|
| 76 |
- Some models are missing individual metric columns; empty cells mean that track was
|
| 77 |
not run (or not reported) for that model.
|
| 78 |
+
- Elo ratings can shift when the comparison pool changes: treat them as relative
|
| 79 |
rankings for the snapshot, not absolute constants.
|
| 80 |
- Optimized / accelerated endpoints (when labeled) may differ from the base model
|
| 81 |
publisher's default serving stack.
|
|
|
|
| 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>
|
|
|
|
| 119 |
</div>
|
| 120 |
+
<p class="app-header-tagline">Compare text-to-image models on quality, speed, and price</p>
|
| 121 |
</header>
|
| 122 |
+
""",
|
| 123 |
+
padding=False,
|
| 124 |
+
elem_classes="app-header-host",
|
| 125 |
)
|
| 126 |
|
| 127 |
|
|
|
|
| 142 |
|
| 143 |
|
| 144 |
def _home_highlights(benchmarks):
|
| 145 |
+
"""Quality leaders per suite: more relevant than cheapest/fastest outliers."""
|
| 146 |
highlights = []
|
| 147 |
unique_models = set()
|
| 148 |
for benchmark in benchmarks:
|
|
|
|
| 184 |
|
| 185 |
gr.Markdown(
|
| 186 |
"""
|
| 187 |
+
InferBench ranks **text-to-image models** on quality, speed, and price using
|
| 188 |
+
the same prompt suites. Open a benchmark for tables, Pareto graphs, and
|
| 189 |
+
sample comparisons.
|
| 190 |
+
""",
|
| 191 |
+
elem_classes="home-intro",
|
| 192 |
)
|
| 193 |
|
| 194 |
if highlights:
|
|
|
|
| 198 |
f"<em>{escape(item['detail'])}</em></div>"
|
| 199 |
for item in highlights
|
| 200 |
]
|
| 201 |
+
gr.HTML(
|
| 202 |
+
f'<div class="home-callouts">{"".join(callout_bits)}</div>',
|
| 203 |
+
padding=False,
|
| 204 |
+
elem_classes="home-callouts-host",
|
| 205 |
+
)
|
| 206 |
|
| 207 |
+
gr.Markdown("## Benchmark snapshots", elem_classes="home-section-title")
|
| 208 |
title_cells = []
|
| 209 |
blurb_cells = []
|
| 210 |
top_cells = []
|
|
|
|
| 254 |
|
| 255 |
def _format_leaderboard_cell(column, value):
|
| 256 |
if pd.isna(value) or value is None or value == "":
|
| 257 |
+
return "-"
|
| 258 |
label = str(column).lower()
|
| 259 |
if label == "rank":
|
| 260 |
return str(int(value))
|
|
|
|
| 573 |
return labels.get(column, column)
|
| 574 |
|
| 575 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 576 |
def _format_score(value):
|
| 577 |
+
return "-" if pd.isna(value) or value is None else f"{float(value):.3f}"
|
| 578 |
|
| 579 |
|
| 580 |
def _format_price(value):
|
| 581 |
+
return "-" if pd.isna(value) or value is None else f"${float(value):.3f}"
|
| 582 |
|
| 583 |
|
| 584 |
def render_benchmark_detail(benchmark):
|