Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
File size: 9,381 Bytes
0061e14 70a0e60 967ec13 e5e5305 967ec13 0061e14 005b269 e5e5305 4d77847 1bed249 e30b579 ad81b69 fdc7723 d7db717 b8cba9d d7db717 b8cba9d 3a9d27d b8cba9d 06f2a09 b8cba9d 06f2a09 b8cba9d 06f2a09 d7db717 3a9d27d d569bb7 3a9d27d d569bb7 9dbaacb d569bb7 d15b3f0 4888ceb d15b3f0 2ba8849 d15b3f0 4888ceb 2ba8849 d15b3f0 4888ceb d15b3f0 4888ceb d15b3f0 07ac8d6 ba1146a e5e5305 005b269 70a0e60 1bed249 e5e5305 70a0e60 e5e5305 ad81b69 70a0e60 e5e5305 ad81b69 61bdf51 ad81b69 fdc7723 d9b5156 61bdf51 ad81b69 e5e5305 260568f fdc7723 e5e5305 fdc7723 70a0e60 97d33e1 70a0e60 fdc7723 e5e5305 fdc7723 70a0e60 1cde003 afb90fb 967ec13 e5e5305 97d33e1 1bed249 70a0e60 e5e5305 1bed249 e5e5305 70a0e60 1bed249 458cf5b 0061e14 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 |
custom_css = """
:root, [data-theme="light"] {
--f1-text: #111827;
--f1-subtle: #6b7280;
--f1-border: #e5e7eb;
--f1-bg: #ffffff;
--f1-bg-muted: #f9fafb;
/* Nuke Gradio chrome that interfered with colors */
--block-border-color: transparent !important;
--background-fill-primary: transparent !important;
}
/* Width caps */
.f1-container { max-width: 800px; margin: 0 auto; padding: 0 16px; }
.markdown-text { font-size: 16px !important; max-width: 800px; margin: 0 auto; }
#what-is-tab { max-width: 800px; margin-left: auto; margin-right: auto; }
/* requested 710px */
#f1-examples { max-width: 710px; margin: 0 auto; }
/* NEW: landing tab width + tier selector alignment */
/* Landing tab width + tier selector alignment */
#landing-accuracy-tab { max-width: 800px; margin-left: auto; margin-right: auto; }
/* Right-align the switcher row; transparent background & border */
#f1-tier-select-row {
justify-content: flex-end;
margin-bottom: 6px;
background: white !important;
border: none !important;
}
/* Make the control look like "pills" and force RTL layout */
#f1-tier-select { direction: rtl; } /* RTL direction (equivalent effect to dir="rtl") */
#f1-tier-select .wrap {
display: inline-flex;
gap: 6px;
padding: 4px;
background: #ffffff; /* white background for the switcher itself */
border: 1px solid var(--f1-border);
border-radius: 999px;
}
#f1-tier-select input[type="radio"] { display: none; }
#f1-tier-select label {
border: none;
border-radius: 999px;
padding: 6px 12px;
background: transparent;
cursor: pointer;
}
#f1-tier-select input[type="radio"]:checked + span {
background: #eef2ff; /* only selected pill is tinted */
border-radius: 999px;
padding: 6px 12px;
box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
#f1-tier-select-row div { border: none; }
#f1-tier-select { background: white; }
#f1-accuracy-plot label { display: false; }
#learn-more-btn, #learn-more-btn button {
background: transparent !important;
border: none !important;
color: #2563eb !important;
font-weight: 700 !important;
font-size: 1.05rem !important;
padding: 0 !important;
box-shadow: none !important;
}
#learn-more-btn button:hover { text-decoration: underline !important; background: transparent !important; }
#landing-hero-row {
max-width: 800px;
margin-left: auto;
margin-right: auto;
margin-bottom: 8px;
align-items: center;
}
#landing-hero-left { padding-right: 8px; }
#landing-hero-right { display: flex; justify-content: flex-end; }
/* Blurb text */
.f1-hero { margin: 0; font-size: 1.02rem; color: var(--f1-text); }
/* Learn More pill β compact */
#learn-more-pill,
#learn-more-pill button {
width: auto !important;
min-width: 0 !important;
background: #2563eb !important;
color: #ffffff !important;
border: 0 !important;
border-radius: 999px !important;
padding: 6px 12px !important;
box-shadow: 0 1px 2px rgba(0,0,0,0.06) !important;
font-weight: 700 !important;
font-size: 0.95rem !important;
white-space: nowrap !important;
}
#learn-more-pill button:hover { filter: brightness(0.95) !important; }
#landing-hero-left { min-width: 75%; }
/* Text */
.f1-p, .f1-li { line-height: 1.75; color: #374151; text-wrap: pretty; overflow-wrap: break-word; hyphens: auto; }
/* Headings */
.f1-h1 { font-weight: 700; font-size: 2.25rem; line-height: 2.5rem; color: var(--f1-text); text-align: center; margin-bottom: 1.25rem !important; }
.f1-h2 { font-weight: 700; border-bottom: 1px solid var(--f1-border); padding-bottom: 0.45rem; margin-top: 1.75rem; margin-bottom: 0.9rem; color: var(--f1-text); font-size: 1.5rem; line-height: 2rem; }
/* Links */
.f1-a { color: #2563eb; text-decoration: none; font-weight: 500; }
.f1-a:hover { text-decoration: underline; }
/* Captions (centered + dark) */
.f1-figcaption { margin-top: 4px; font-size: 0.875rem; color: #111827; text-align: center; }
.f1-figcaption-video { margin-top: 2px; } /* tighter under the video */
/* Problem name β force center from first render; code bg color #f9fafb */
#f1-examples .f1-problem-markdown .markdown p:first-child { text-align: center !important; margin: 0 0 8px 0; }
.f1-problem-markdown p code,
#f1-examples .f1-problem-markdown .markdown p:first-child code {
display: inline-block; background: #f9fafb !important; padding: 2px 8px; border-radius: 6px; margin-left: auto; margin-right: auto;
}
.f1-problem-markdown > * { margin-top: 7px; margin-bottom: 7px; line-height: 1.8; }
/* Problem body: padding + comfortable line-height inside Markdown + small space before tabs */
#f1-examples .f1-problem-markdown .markdown { background: var(--f1-bg-muted); border: 1px solid var(--f1-border); border-radius: 8px; padding: 18px; margin: 10px 14px 10px 14px; line-height: 1.8; }
#f1-examples .f1-problem-markdown .markdown p { margin: 0.35rem 0; }
/* Pills (Radio) β compact spacing at bottom */
#f1-example-radio { border-top: 1px solid var(--f1-border); padding: 8px 10px 4px 10px; margin: 0 8px 2px; }
#f1-example-radio input[type="radio"] { display: none; }
#f1-example-radio .wrap { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-start; }
#f1-example-radio label { border: 1px solid var(--f1-border); border-radius: 999px; padding: 6px 10px; cursor: pointer; background: #f3f4f6; }
#f1-example-radio input[type="radio"]:checked + span { background: #e5e7eb; border-color: var(--f1-border); border-radius: 999px; padding: 6px 10px; }
/* Examples card chrome */
#f1-examples { background: var(--f1-bg-muted); border: 1px solid var(--f1-border); border-radius: 10px; box-shadow: 0 1px 2px rgba(0,0,0,0.04); margin-bottom: 12px; }
#f1-examples .form { background: transparent !important; } /* no bg on inner form container */
.f1-tabs-body { padding-top: 12px; text-align: center; }
.f1-examples-chip { display: inline-block; background: #e5e7eb; color: #111827; padding: 6px 12px; border-radius: 999px; font-weight: 700; }
/* Figures via Gradio components (centered, rounded, shadow) */
.f1-image img, .f1-video video { width: 100%; max-width: 42rem; display: block; margin: 0 auto; border-radius: 12px; box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
/* Categories "table" β equal width per column set; compact first two, flexible third */
.f1-grid-wrap { text-align: center; margin: 10px auto 8px auto; }
.f1-grid-table {
display: inline-grid;
grid-template-columns: max-content 12ch minmax(360px, 1fr); /* 2nd col fixed width; 3rd grows */
border: 1px solid var(--f1-border);
background: var(--f1-bg);
border-radius: 8px;
overflow: hidden;
}
.f1-grid-row { display: contents; }
.f1-grid-cell { padding: 8px 12px; text-align: left; border-left: 1px solid var(--f1-border); border-top: 1px solid var(--f1-border); white-space: normal; }
.f1-grid-cell:nth-child(3n+1) { border-left: none; }
.f1-grid-head .f1-grid-cell { font-weight: 600; text-align: center; border-top: none; }
#f1-login-box { width: 800px; margin: auto; }
/* Leaderboard: cap width at 800px and center; keep your chain rule */
#formulaone-leaderboard-tab-table { max-width: 800px; margin-left: auto; margin-right: auto; }
#formulaone-leaderboard-tab-table .column .row .column { min-width: 80% !important; }
#formulaone-leaderboard-tab-table .row, #formulaone-leaderboard-tab-table .column { width: 100% !important; max-width: 100% !important; }
#formulaone-leaderboard-tab-table [data-testid="dropdown"], #formulaone-leaderboard-tab-table input[type="text"] { width: 100% !important; }
/* Login button: force light and width cap */
#hf-login-btn, #hf-login-btn button, button[data-testid="login-button"], [data-testid="login-button"] button, div[data-testid="login-button"] > button {
background: #ffffff !important; color: #1f2937 !important; border: 1px solid var(--f1-border) !important; box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.04) !important;
max-width: 800px !important; width: 100% !important; margin-left: auto !important; margin-right: auto !important;
}
#hf-login-btn:hover, #hf-login-btn button:hover, button[data-testid="login-button"]:hover, [data-testid="login-button"] button:hover, div[data-testid="login-button"] > button:hover { background: #f9fafb !important; }
/* Checkbox styling for submission requirements */
.markdown-text input[type="checkbox"] {
margin-right: 8px !important;
width: 16px !important;
height: 16px !important;
accent-color: #2563eb !important;
cursor: pointer !important;
}
.markdown-text label[data-testid="checkbox"] {
color: var(--f1-text) !important;
font-size: 14px !important;
line-height: 1.5 !important;
cursor: pointer !important;
display: flex !important;
align-items: flex-start !important;
margin-bottom: 8px !important;
}
/* Submit button styling when disabled */
button[data-testid="button"]:disabled {
opacity: 0.5 !important;
cursor: not-allowed !important;
background: #f3f4f6 !important;
color: #9ca3af !important;
border-color: #d1d5db !important;
}
/* Required Agreements section
.markdown-text h3 {
color: var(--f1-text) !important;
font-weight: 600 !important;
margin: 20px 0 12px 0 !important;
font-size: 18px !important;
}
*/
"""
get_window_url_params = """
function(url_params) {
const params = new URLSearchParams(window.location.search);
url_params = Object.fromEntries(params);
return url_params;
}
"""
|