|
custom_js = """ |
|
function tableLinkHack() { |
|
// This is a hack to make the table links work |
|
var allTableLinks = document.querySelectorAll(".llm-benchmark-tab-table .table-wrap table.table a") |
|
for (var link of allTableLinks) { |
|
link.addEventListener("click", e => { |
|
window.open(e.target.href, e.target.target); |
|
}); |
|
} |
|
} |
|
""" |
|
|
|
custom_css = """ |
|
footer {visibility: hidden} |
|
|
|
#main { |
|
max-width: 1200px; |
|
margin: 0 auto; |
|
padding: 0 20px; |
|
} |
|
|
|
.gradio-container { |
|
max-width: 1200px !important; |
|
margin: 0 auto !important; |
|
} |
|
|
|
.intro-text { |
|
text-align: center; /* Center the text */ |
|
font-size: 3rem; /* Slightly larger font size if desired */ |
|
color: #555; /* A slightly softer color than black */ |
|
margin-bottom: 5px; /* Add some space below the text before the tabs */ |
|
padding: 0 10px; /* Add some horizontal padding for wider screens */ |
|
line-height: 1.2; /* Improve readability with line height */ |
|
max-width: 1200px; /* Limit width for better readability on large screens */ |
|
margin-left: auto; /* Center the block horizontally */ |
|
margin-right: auto; /* Center the block horizontally */ |
|
} |
|
|
|
.tab-buttons button { |
|
font-size: 20px; |
|
} |
|
|
|
.intro-block { |
|
padding: 20px; |
|
} |
|
|
|
.header-row { |
|
height: 0; |
|
min-height: 0; |
|
} |
|
|
|
.tabitem { |
|
padding-top: 0; |
|
} |
|
|
|
.html-container { |
|
padding: 0; |
|
} |
|
|
|
#page-header { |
|
display: flex; |
|
justify-content: center; |
|
text-align: center; |
|
margin-bottom: 1rem; |
|
} |
|
|
|
#header-container{ |
|
display: flex; |
|
width: 800px; |
|
} |
|
|
|
#left-container { |
|
flex: 1; |
|
} |
|
|
|
#left-container #black-logo, #left-container #white-logo { |
|
height: 150px; |
|
width: 150px; |
|
} |
|
|
|
#left-container #black-logo { |
|
display: block; |
|
} |
|
|
|
#left-container #white-logo { |
|
display: none; |
|
} |
|
|
|
#centre-container { |
|
align-self: center; |
|
} |
|
|
|
#right-container { |
|
flex: 1; |
|
align-self: center; |
|
} |
|
|
|
#right-container #black-logo, #right-container #white-logo { |
|
height: 150px; |
|
width: 150px; |
|
} |
|
|
|
#right-container #black-logo { |
|
display: block; |
|
} |
|
|
|
#right-container #white-logo { |
|
display: none; |
|
} |
|
|
|
.llm-benchmark-tab-table .table-wrap table.table { |
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; |
|
color: rgb(97, 97, 97); |
|
overflow-y: auto; |
|
overflow-x: auto; |
|
} |
|
|
|
.llm-benchmark-tab-table .table-wrap table.table a { |
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; |
|
color: #ec4899 |
|
} |
|
|
|
.llm-benchmark-tab-table .table-wrap table.table tr td, |
|
.llm-benchmark-tab-table .table-wrap table.table tr th { |
|
border-bottom: 1px solid var(--border-color-primary); |
|
} |
|
|
|
.llm-benchmark-tab-table .table-wrap table.table a { |
|
color: rgb(2, 136, 209) !important; |
|
} |
|
|
|
.llm-benchmark-tab-table .table-wrap table.table th { |
|
font-size: 14px; /* Smaller font size for table headers */ |
|
font-weight: 600; /* Semi-bold instead of full bold */ |
|
} |
|
|
|
@media (prefers-color-scheme: dark) { |
|
#left-container #black-logo { |
|
display: none; |
|
} |
|
#left-container #white-logo { |
|
display: block; |
|
} |
|
#right-container #black-logo { |
|
display: none; |
|
} |
|
#right-container #white-logo { |
|
display: block; |
|
} |
|
} |
|
|
|
.benchmark-table-container table { |
|
width: 100%; /* Make table take full width of its container */ |
|
border-collapse: collapse; /* Remove spacing between table cells */ |
|
margin-bottom: 20px; /* Add some space below the table */ |
|
} |
|
|
|
.benchmark-table-container th, .benchmark-table-container td { |
|
border: 1px solid #ddd; /* Light gray border for cells */ |
|
padding: 8px; /* Padding within cells for better spacing */ |
|
text-align: left; /* Align text to the left within cells */ |
|
vertical-align: top; /* Align content to the top of cells */ |
|
} |
|
|
|
.benchmark-table-container th { |
|
background-color: #f2f2f2; /* Light gray background for header row */ |
|
font-weight: bold; /* Make header text bold */ |
|
} |
|
|
|
.benchmark-table-container tbody tr:nth-child(even) { |
|
background-color: #f9f9f9; /* Very light gray background for even rows for zebra striping */ |
|
} |
|
|
|
@media (prefers-color-scheme: dark) { |
|
#left-container #black-logo { |
|
display: none; |
|
} |
|
#left-container #white-logo { |
|
display: block; |
|
} |
|
.benchmark-table-container th { |
|
background-color: #3b3b3b; |
|
} |
|
.benchmark-table-container tbody tr:nth-child(even) { |
|
background-color: #2b2b2b; |
|
} |
|
} |
|
|
|
""" |
|
|
|
get_window_url_params = """ |
|
function(url_params) { |
|
const params = new URLSearchParams(window.location.search); |
|
url_params = Object.fromEntries(params); |
|
return url_params; |
|
} |
|
""" |
|
|