| custom_css = """ |
| |
| .markdown-text { |
| font-size: 16px !important; |
| } |
| |
| #models-to-add-text { |
| font-size: 18px !important; |
| } |
| |
| #citation-button span { |
| font-size: 16px !important; |
| color: #111827 !important; /* even darker label */ |
| font-weight: 700 !important; |
| } |
| /* Darken the small helper text produced by Gradio for `info` */ |
| #citation-button [data-testid="block-info"], |
| #citation-button .gr-info, |
| #citation-button .svelte-1ipelgc { /* fallback for some Gradio builds */ |
| color: #111827 !important; |
| font-weight: 600 !important; |
| } |
| |
| #citation-button textarea { |
| font-size: 14px !important; |
| } |
| |
| #citation-button > label > button { |
| margin: 6px; |
| transform: scale(1.0); |
| } |
| /* Citation container should match main content width and alignment */ |
| .citation-container { |
| width: 100%; |
| margin: 0; |
| padding: 0; |
| } |
| .citation-title h3 { |
| text-align: left; |
| margin-bottom: 12px; |
| font-size: 18px; |
| font-weight: 600; |
| color: #374151; |
| margin-left: 0; |
| padding-left: 0; |
| } |
| |
| |
| #leaderboard-table { |
| margin-top: 15px |
| } |
| |
| #leaderboard-table-lite { |
| margin-top: 15px |
| } |
| |
| #search-bar-table-box > div:first-child { |
| background: none; |
| border: none; |
| } |
| |
| #search-bar { |
| padding: 0px; |
| } |
| |
| /* Table headers sizing - aggressive targeting */ |
| #leaderboard-table thead th, |
| .dataframe thead th, |
| table thead th, |
| [data-testid="block-label"] th, |
| .gr-dataframe th, |
| div[data-testid] table th, |
| .gradio-container table th { |
| font-size: 20px !important; |
| font-weight: 600 !important; |
| padding: 10px 12px !important; |
| height: auto !important; |
| min-height: 30px !important; |
| } |
| |
| /* LLM column (1st column) - set to 200px */ |
| #leaderboard-table td:nth-child(1), |
| #leaderboard-table th:nth-child(1), |
| .dataframe td:nth-child(1), |
| .dataframe th:nth-child(1), |
| .gr-dataframe td:nth-child(1), |
| .gr-dataframe th:nth-child(1), |
| div[data-testid] table td:nth-child(1), |
| div[data-testid] table th:nth-child(1) { |
| min-width: 200px !important; |
| max-width: 200px !important; |
| width: 200px !important; |
| flex: 0 0 200px !important; |
| } |
| |
| /* Old rule for 2nd column - removing restriction */ |
| #leaderboard-table td:nth-child(2), |
| #leaderboard-table th:nth-child(2) { |
| max-width: none; |
| overflow: visible; |
| white-space: normal; |
| } |
| |
| .tab-buttons button { |
| font-size: 20px; |
| } |
| |
| /* Make refresh button exactly match dropdown control styling */ |
| .gradio-container #refresh-button button, |
| #refresh-button > div > button, |
| #refresh-button button { |
| font-family: inherit !important; |
| font-size: 14px !important; |
| font-weight: 400 !important; |
| height: 40px !important; |
| min-height: 40px !important; |
| padding: 8px 12px !important; |
| border-radius: 6px !important; |
| border: 1px solid #d1d5db !important; |
| background: #ffffff !important; |
| color: #374151 !important; |
| box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important; |
| line-height: 1 !important; |
| display: flex !important; |
| align-items: center !important; |
| justify-content: center !important; |
| text-align: center !important; |
| vertical-align: middle !important; |
| } |
| |
| /* Ensure text content within refresh button is perfectly centered */ |
| .gradio-container #refresh-button button *, |
| #refresh-button > div > button *, |
| #refresh-button button * { |
| line-height: 1 !important; |
| vertical-align: middle !important; |
| margin: 0 !important; |
| padding: 0 !important; |
| } |
| .gradio-container #refresh-button button:hover, |
| #refresh-button > div > button:hover, |
| #refresh-button button:hover { |
| background: #f9fafb !important; |
| border-color: #9ca3af !important; |
| } |
| .gradio-container #refresh-button, |
| #refresh-button { |
| height: 40px; |
| display: flex; |
| align-items: stretch; |
| } |
| |
| #scale-logo { |
| border-style: none !important; |
| box-shadow: none; |
| display: block; |
| margin-left: auto; |
| margin-right: auto; |
| max-width: 600px; |
| } |
| |
| #scale-logo .download { |
| display: none; |
| } |
| #filter_type{ |
| border: 0; |
| padding-left: 0; |
| padding-top: 0; |
| } |
| #filter_type label { |
| display: flex; |
| } |
| #filter_type label > span{ |
| margin-top: var(--spacing-lg); |
| margin-right: 0.5em; |
| } |
| #filter_type label > .wrap{ |
| width: 103px; |
| } |
| #filter_type label > .wrap .wrap-inner{ |
| padding: 2px; |
| } |
| #filter_type label > .wrap .wrap-inner input{ |
| width: 1px |
| } |
| #filter-columns-type{ |
| border:0; |
| padding:0.5; |
| } |
| #filter-columns-size{ |
| border:0; |
| padding:0.5; |
| } |
| #box-filter > .form{ |
| border: 0 |
| } |
| |
| /* Allow line breaks and apply larger, readable headers */ |
| .dataframe thead th, |
| #leaderboard-table thead th, |
| table thead th, |
| .gr-dataframe thead th, |
| div[data-testid] table thead th, |
| .gradio-container table thead th { |
| white-space: pre-line !important; |
| line-height: 1.2 !important; |
| font-size: 20px !important; |
| font-weight: 600 !important; |
| padding: 10px 12px !important; |
| height: auto !important; |
| text-transform: none !important; |
| } |
| /* Ensure header font-size applies to any nested elements */ |
| #leaderboard-table thead th *, |
| .gr-dataframe thead th *, |
| div[data-testid] table thead th * { |
| font-size: 20px !important; |
| line-height: 1.2 !important; |
| } |
| |
| /* Agents table: make explicit N/A badge style */ |
| .na-badge { |
| color: #888; |
| } |
| |
| /* Agents table column widths with stronger selectors */ |
| /* LLM column (1st column) - force 200px */ |
| #leaderboard-table thead tr th:nth-child(1), |
| #leaderboard-table tbody tr td:nth-child(1), |
| .dataframe thead tr th:nth-child(1), |
| .dataframe tbody tr td:nth-child(1), |
| .gr-dataframe thead tr th:nth-child(1), |
| .gr-dataframe tbody tr td:nth-child(1) { |
| min-width: 200px !important; |
| max-width: 200px !important; |
| width: 200px !important; |
| flex: 0 0 200px !important; |
| box-sizing: border-box !important; |
| } |
| |
| /* Calibration Error column (7th column) - remove width constraints, avoid ellipsis */ |
| #leaderboard-table thead tr th:nth-child(7), |
| #leaderboard-table tbody tr td:nth-child(7), |
| .dataframe thead tr th:nth-child(7), |
| .dataframe tbody tr td:nth-child(7) { |
| white-space: normal !important; |
| overflow: visible !important; |
| text-overflow: clip !important; |
| } |
| |
| /* Model Size column (8th column) - remove width constraints, avoid ellipsis */ |
| #leaderboard-table thead tr th:nth-child(8), |
| #leaderboard-table tbody tr td:nth-child(8), |
| .dataframe thead tr th:nth-child(8), |
| .dataframe tbody tr td:nth-child(8) { |
| white-space: normal !important; |
| overflow: visible !important; |
| text-overflow: clip !important; |
| } |
| |
| /* Gradio-specific table styling */ |
| .gr-dataframe table thead th, |
| .gr-dataframe thead th, |
| div.gr-dataframe th, |
| [data-testid*="dataframe"] th, |
| .gradio-container [data-testid] th { |
| font-size: 20px !important; |
| font-weight: 600 !important; |
| padding: 10px 12px !important; |
| line-height: 1.2 !important; |
| height: auto !important; |
| text-transform: none !important; |
| } |
| |
| .gr-dataframe table tbody td { |
| padding: 6px !important; |
| } |
| |
| /* Super aggressive LLM column targeting - set to 200px */ |
| .gr-dataframe table thead th:first-child, |
| .gr-dataframe table tbody td:first-child, |
| .gr-dataframe thead th:first-child, |
| .gr-dataframe tbody td:first-child, |
| div.gr-dataframe th:first-child, |
| div.gr-dataframe td:first-child, |
| [data-testid*="dataframe"] th:first-child, |
| [data-testid*="dataframe"] td:first-child { |
| min-width: 200px !important; |
| max-width: 200px !important; |
| width: 200px !important; |
| flex: 0 0 200px !important; |
| box-sizing: border-box !important; |
| } |
| |
| /* Removed merged header attempt */ |
| """ |
|
|
| get_window_url_params = """ |
| function(url_params) { |
| const params = new URLSearchParams(window.location.search); |
| url_params = Object.fromEntries(params); |
| return url_params; |
| } |
| """ |
|
|