Spaces:
Running
Running
UI: noise-floor axis visualization, drag-drop submit, polished shell
Browse filesSignature visual puts the experimental noise band on the MAE axis so a method sitting inside the measurement limit is visible at a glance. Adds file drop for predictions, CSV parsing, rank medals, leakage chips.
- index.html +424 -236
index.html
CHANGED
|
@@ -4,118 +4,223 @@
|
|
| 4 |
<meta charset="utf-8">
|
| 5 |
<meta name="viewport" content="width=device-width,initial-scale=1">
|
| 6 |
<title>LEADBOARD โ ์ ์ฝ ์์ธก ๋๊ตฌ ์ํ๋</title>
|
|
|
|
| 7 |
<!-- <head> ๋ ์ ํ์ด ์๋๋ค: ํ๋ซํผ์ด ์๊ธฐ ํ๊ทธ๋ฅผ ๋ฌธ์์ ์ฃผ์
ํ๋๋ฐ, ๋ฐ์ head ๊ฐ ์์ผ๋ฉด
|
| 8 |
๊ทธ๊ฒ๋ค์ด doctype ์์ ๋์ด๊ณ ํ์ด์ง ์ ์ฒด๊ฐ ์ฟผํฌ ๋ชจ๋๋ก ๋จ์ด์ง๋ค. -->
|
| 9 |
<style>
|
| 10 |
:root{
|
| 11 |
-
--bg:#
|
| 12 |
-
--
|
| 13 |
-
--
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
}
|
| 15 |
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]){
|
| 16 |
-
--bg:#
|
| 17 |
-
--
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
:root[data-theme="dark"]{
|
| 19 |
-
--bg:#
|
| 20 |
-
--
|
|
|
|
|
|
|
| 21 |
*{box-sizing:border-box}
|
| 22 |
-
|
|
|
|
| 23 |
font-family:-apple-system,BlinkMacSystemFont,"Pretendard","Apple SD Gothic Neo",
|
| 24 |
-
"Malgun Gothic",Segoe UI,Roboto,sans-serif;-webkit-font-smoothing:antialiased
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
|
|
|
|
|
|
|
|
|
| 28 |
|
| 29 |
-
/* nav */
|
| 30 |
-
nav{position:sticky;top:0;z-index:
|
| 31 |
-
backdrop-filter:blur(
|
| 32 |
-
nav .in{max-width:
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
.
|
| 38 |
-
|
| 39 |
-
.
|
| 40 |
-
.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 41 |
|
| 42 |
-
|
| 43 |
-
.
|
| 44 |
-
.
|
| 45 |
-
|
| 46 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 47 |
|
| 48 |
-
|
| 49 |
-
.
|
| 50 |
-
.stat
|
| 51 |
-
|
|
|
|
|
|
|
|
|
|
| 52 |
|
| 53 |
-
h2{font-size:
|
| 54 |
-
color:var(--
|
| 55 |
-
|
| 56 |
-
|
|
|
|
| 57 |
|
| 58 |
-
|
| 59 |
-
.
|
| 60 |
-
|
| 61 |
-
.
|
| 62 |
-
.
|
| 63 |
-
.
|
| 64 |
-
.
|
| 65 |
-
.
|
| 66 |
-
.
|
| 67 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 68 |
display:flex;justify-content:space-between;gap:8px}
|
| 69 |
-
.pill{display:inline-block;font-size:11px;font-family:var(--mono);padding:2px 7px;
|
| 70 |
-
border-radius:20px;background:var(--soft);color:var(--accent);font-weight:700}
|
| 71 |
-
.pill.gr{background:transparent;border:1px solid var(--line);color:var(--muted)}
|
| 72 |
|
| 73 |
-
|
| 74 |
-
.
|
|
|
|
|
|
|
|
|
|
|
|
|
| 75 |
border:0;background:none;border-bottom:2px solid transparent;margin-bottom:-1px}
|
| 76 |
-
.tab
|
| 77 |
-
.
|
| 78 |
-
.
|
| 79 |
-
.
|
|
|
|
|
|
|
|
|
|
| 80 |
|
| 81 |
-
table
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
th
|
| 86 |
-
|
| 87 |
-
td:
|
| 88 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 89 |
tr.base td{color:var(--muted)}
|
| 90 |
-
tr.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 91 |
.fig{background:var(--card);border:1px solid var(--line);border-radius:12px;padding:18px 20px;
|
| 92 |
-
margin:16px 0;font-family:var(--mono);font-size:13px;line-height:1.95;overflow-x:auto
|
| 93 |
-
|
| 94 |
-
.
|
| 95 |
-
|
| 96 |
-
|
|
|
|
|
|
|
| 97 |
.kv dt{color:var(--muted)}
|
| 98 |
-
.kv dd{margin:0;font-family:var(--mono);font-size:13px}
|
| 99 |
-
|
| 100 |
-
border-radius:8px;background:var(--card);color:var(--ink);font-family:var(--mono);font-size:13px}
|
| 101 |
-
label{display:block;font-size:13px;font-weight:600;margin:14px 0 5px}
|
| 102 |
.hint{font-size:12px;color:var(--muted);font-weight:400}
|
| 103 |
-
|
| 104 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 105 |
</style>
|
| 106 |
</head>
|
| 107 |
<body>
|
| 108 |
|
| 109 |
<nav><div class="in">
|
| 110 |
-
<a class="lg" href="#/">LEAD<
|
| 111 |
-
<span class="
|
| 112 |
<span class="sp"></span>
|
| 113 |
-
<span
|
| 114 |
</div></nav>
|
| 115 |
|
| 116 |
-
<div class="wrap"
|
| 117 |
|
| 118 |
-
<footer class="wrap"
|
| 119 |
<span>LEADBOARD ยท FINAL-Bench / VIDRAFT</span>
|
| 120 |
<a href="/api/health">API</a>
|
| 121 |
<a href="https://huggingface.co/spaces/FINAL-Bench/open-discovery-challenge">ODC</a>
|
|
@@ -123,229 +228,312 @@
|
|
| 123 |
</footer>
|
| 124 |
|
| 125 |
<script>
|
| 126 |
-
const $
|
| 127 |
-
const
|
| 128 |
-
const
|
| 129 |
-
|
| 130 |
-
|
|
|
|
|
|
|
| 131 |
|
| 132 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 133 |
|
| 134 |
async function boot(){
|
| 135 |
-
try{
|
| 136 |
$("#who").innerHTML = ME.user
|
| 137 |
? `${esc(ME.user.user)} ยท <a href="/logout">๋ก๊ทธ์์</a>`
|
| 138 |
-
: (ME.login_enabled
|
| 139 |
-
CATS
|
| 140 |
-
$("#spec").textContent
|
|
|
|
| 141 |
route();
|
| 142 |
}
|
| 143 |
-
|
| 144 |
-
|
| 145 |
function route(){
|
| 146 |
-
const p
|
| 147 |
-
|
| 148 |
-
if(!p.length)
|
| 149 |
-
if(p[0]==="c")
|
| 150 |
-
if(p[0]==="b")
|
| 151 |
hub();
|
| 152 |
}
|
| 153 |
|
| 154 |
-
/*
|
| 155 |
function hub(){
|
| 156 |
-
const t
|
| 157 |
-
|
| 158 |
-
|
| 159 |
-
|
|
|
|
| 160 |
<p class="sub">๋ฆฌ๋๋ณด๋ ยท AI ์ ์ฝ ์์ธก ๋๊ตฌ ์ํ๋</p>
|
| 161 |
-
<p class="tag">์ ์ฝ ์์ธก ๋๊ตฌ๋ฅผ,
|
| 162 |
-
<p class="
|
| 163 |
-
|
| 164 |
-
|
| 165 |
-
|
| 166 |
-
|
| 167 |
-
|
| 168 |
-
|
|
|
|
| 169 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 170 |
<h2>์นดํ
๊ณ ๋ฆฌ</h2>
|
|
|
|
| 171 |
<div class="grid">${CATS.categories.map(cardHTML).join("")}</div>
|
| 172 |
-
|
| 173 |
-
<
|
| 174 |
-
|
| 175 |
-
<
|
| 176 |
-
|
| 177 |
-
|
| 178 |
-
|
| 179 |
-
|
| 180 |
-
|
| 181 |
-
|
| 182 |
-
|
| 183 |
-
|
| 184 |
-
|
| 185 |
-
</
|
| 186 |
}
|
| 187 |
|
| 188 |
function cardHTML(c){
|
| 189 |
-
const on
|
| 190 |
-
const
|
| 191 |
-
|
| 192 |
-
|
| 193 |
-
<div class="nm">${esc(c.name)} <span class="pill ${on?"":"gr"}">${on?c.open+" ๊ฐ์ค":"์ค๋น ์ค"}</span></div>
|
| 194 |
<div class="ds">${esc(c.desc)}</div>
|
| 195 |
<div class="mt"><span>๋ถ๋ฌธ ${c.planned}</span>
|
| 196 |
-
<span>${best?`${esc(best.board)} ์ก์ ${f(best.noise_floor.sd_single)}`:"โ"}</span></div>`;
|
| 197 |
-
return on
|
| 198 |
-
: `<div class="cc off">${inner}</div>`;
|
| 199 |
}
|
| 200 |
|
| 201 |
-
/*
|
| 202 |
function category(id){
|
| 203 |
-
const c
|
| 204 |
-
|
| 205 |
-
|
| 206 |
-
app.innerHTML = `
|
| 207 |
<div class="crumb"><a href="#/">์ ์ฒด</a> โบ ${esc(c.name)}</div>
|
| 208 |
-
<h1
|
| 209 |
-
<p class="
|
| 210 |
-
|
| 211 |
-
|
| 212 |
-
|
| 213 |
-
|
| 214 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 215 |
}
|
| 216 |
-
|
| 217 |
function boardMini(b){
|
|
|
|
| 218 |
return `<a class="cc" href="#/b/${encodeURIComponent(b.board)}">
|
| 219 |
-
<div class="nm">${esc(b.board)}
|
| 220 |
-
<span class="pill">${b.split_grade}/${b.answer_grade}</span></div>
|
| 221 |
<div class="ds">ํ
์คํธ ${b.n_test.toLocaleString()}๊ฐ ยท ์ก์ ๋ฐ๋ฅ ${f(b.noise_floor.sd_single)}<br>
|
| 222 |
-
์ต์ ๊ธฐ์ค์ ${esc(b.best_baseline)} ${f(
|
| 223 |
<div class="mt"><span>${esc(b.source)}</span><span>์ค์ฐจรท์ก์ ${f(b.error_over_noise,2)}ร</span></div></a>`;
|
| 224 |
}
|
| 225 |
|
| 226 |
-
/*
|
| 227 |
-
async function board(name,
|
| 228 |
-
const b
|
| 229 |
-
const cat
|
| 230 |
-
const T
|
| 231 |
-
app.innerHTML
|
| 232 |
<div class="crumb"><a href="#/">์ ์ฒด</a> โบ <a href="#/c/${cat?cat.id:""}">${esc(cat?cat.name:"")}</a> โบ ${esc(b.board)}</div>
|
| 233 |
-
<h1
|
| 234 |
-
|
| 235 |
-
|
| 236 |
-
|
| 237 |
-
|
| 238 |
-
|
| 239 |
-
|
| 240 |
-
if(tab==="
|
| 241 |
-
if(tab==="submit") return paneSubmit(b);
|
| 242 |
paneInfo(b);
|
| 243 |
}
|
| 244 |
|
| 245 |
async function paneRank(b){
|
| 246 |
-
const d
|
| 247 |
-
const nf
|
| 248 |
-
const
|
| 249 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 250 |
<td>${f(r.mae)}</td><td>${f(r.auroc)}</td><td>${f(r.prauc)}</td>
|
| 251 |
-
<td>${r.kind==="baseline"?'<span class="
|
| 252 |
-
|
| 253 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 254 |
<div class="tw"><table>
|
| 255 |
-
<thead><tr><th>#</th><th>๋ฐฉ๋ฒ</th><th>์ ์ถ์</th><th>MAE</th><th>AUROC</th>
|
|
|
|
| 256 |
<tbody>${rows}</tbody></table></div>
|
| 257 |
-
<div class="note"><b>์ก์ ๋ฐ๋ฅ ${f(nf)} log.</b>
|
| 258 |
-
|
| 259 |
๊ธฐ์ค์ 3์ข
์ ํ์์ ๋ด๋ ค๊ฐ์ง ์์ต๋๋ค (3์กฐ).</div>
|
| 260 |
-
${
|
| 261 |
-
`<p class="
|
| 262 |
}
|
| 263 |
|
| 264 |
function paneInfo(b){
|
| 265 |
-
const nf=b.noise_floor,
|
| 266 |
-
$("#pane").innerHTML
|
| 267 |
<h3>๋ฑ๊ธ</h3>
|
| 268 |
<dl class="kv">
|
| 269 |
-
<dt>๋ถํ ๋ฑ๊ธ<
|
| 270 |
-
<dt>์ ๋ต ๋ฑ๊ธ<
|
| 271 |
</dl>
|
| 272 |
<h3>ํ๋์์</h3>
|
| 273 |
<dl class="kv">
|
| 274 |
<dt>์ถ์ฒ</dt><dd>${esc(b.source)} ยท ${esc(b.target)} ยท ${esc(b.type)}</dd>
|
| 275 |
-
<dt>๋ถํ ๊ธฐ์ค์ผ</dt><dd>${b.cut}
|
| 276 |
<dt>ํ๋ จ / ํ
์คํธ</dt><dd>${b.n_train.toLocaleString()} / ${b.n_test.toLocaleString()}</dd>
|
| 277 |
<dt>๊ตฌ์กฐ ๊ฒน์นจ</dt><dd>0 (์๊ฐ๋ถํ ์ ์์)</dd>
|
| 278 |
<dt>๋ถ๋ฅ ์๊ณ</dt><dd>p > ${b.threshold} ยท ์์ฑ ${(b.positive_rate*100).toFixed(1)}%</dd>
|
| 279 |
<dt>๋ฐ์ดํฐ ์ง๋ฌธ</dt><dd>${esc(b.dataset_sha)}</dd>
|
| 280 |
</dl>
|
| 281 |
-
<h3>์ก์ ๋ฐ๋ฅ (4์กฐ)</h3>
|
| 282 |
<div class="fig">
|
| 283 |
-
|
| 284 |
-
<span class="
|
| 285 |
์ค์๊ฐ ${f(nf.median)} ยท ํ๊ท ${f(nf.mean)} ยท 90๋ถ์ ${f(nf.p90)}<br>
|
| 286 |
<b>๋จ์ผ ์ธก์ SD ์ถ์ <span class="n">${f(nf.sd_single)}</span> log</b>
|
| 287 |
</div>
|
| 288 |
-
<div class="note">๋ถ๋ฅ ์๊ณ์ ์์ ์คํ ์ค์ฐจ ํ ์นธ ์์ ์๋ ํ
์คํธ ํํฉ๋ฌผ์ด
|
| 289 |
-
|
| 290 |
-
|
| 291 |
-
<
|
| 292 |
-
|
| 293 |
-
|
| 294 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 295 |
</tbody></table></div>
|
| 296 |
-
<
|
| 297 |
? "ํ์ต ๊ธฐ์ค์ ๏ฟฝ๏ฟฝ ์์ ์์ธก์ ๋์์ต๋๋ค."
|
| 298 |
-
: "<b>ํ์ต ๊ธฐ์ค์ ์ด ์์ ์์ธก์ ๋์ง ๋ชปํ์ต๋๋ค.</b>
|
| 299 |
}
|
| 300 |
|
| 301 |
function paneSubmit(b){
|
| 302 |
-
const url
|
| 303 |
-
$("#pane").innerHTML
|
| 304 |
-
|
| 305 |
-
<
|
| 306 |
-
|
| 307 |
-
|
| 308 |
-
|
| 309 |
-
|
| 310 |
-
|
| 311 |
-
|
| 312 |
-
|
| 313 |
-
|
| 314 |
-
|
| 315 |
-
|
| 316 |
-
|
| 317 |
-
|
| 318 |
-
|
| 319 |
-
|
| 320 |
-
|
| 321 |
-
|
| 322 |
-
|
| 323 |
-
|
| 324 |
-
|
| 325 |
-
|
| 326 |
-
|
| 327 |
-
|
| 328 |
-
|
| 329 |
-
|
| 330 |
-
|
| 331 |
-
|
| 332 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 333 |
try{
|
| 334 |
-
const r
|
| 335 |
-
body:JSON.stringify({board:b.board,
|
| 336 |
-
predictions:preds,
|
| 337 |
-
msg.innerHTML
|
| 338 |
-
}catch(e){
|
| 339 |
-
|
| 340 |
-
try{ t = JSON.parse(t).detail || t; }catch(_){}
|
| 341 |
-
msg.textContent = t;
|
| 342 |
-
}
|
| 343 |
-
go.disabled = false;
|
| 344 |
};
|
| 345 |
}
|
| 346 |
|
| 347 |
-
boot().catch(e
|
| 348 |
-
|
| 349 |
</script>
|
| 350 |
</body>
|
| 351 |
</html>
|
|
|
|
| 4 |
<meta charset="utf-8">
|
| 5 |
<meta name="viewport" content="width=device-width,initial-scale=1">
|
| 6 |
<title>LEADBOARD โ ์ ์ฝ ์์ธก ๋๊ตฌ ์ํ๋</title>
|
| 7 |
+
<meta name="description" content="์ ์ฝ ์์ธก ๋๊ตฌ๋ฅผ ๋ถ์ผ๋ณ๋ก ๊ฐ์ ์ฃ๋๋ก ์ฐ๋ค. ์ ๋ต์ ๋๋ ์ฃผ์ง ์๊ณ , ๊ธฐ์ค์ ๊ณผ ์คํ ์ค์ฐจ๋ฅผ ๋จผ์ ๊ณต๊ฐํ๋ค.">
|
| 8 |
<!-- <head> ๋ ์ ํ์ด ์๋๋ค: ํ๋ซํผ์ด ์๊ธฐ ํ๊ทธ๋ฅผ ๋ฌธ์์ ์ฃผ์
ํ๋๋ฐ, ๋ฐ์ head ๊ฐ ์์ผ๋ฉด
|
| 9 |
๊ทธ๊ฒ๋ค์ด doctype ์์ ๋์ด๊ณ ํ์ด์ง ์ ์ฒด๊ฐ ์ฟผํฌ ๋ชจ๋๋ก ๋จ์ด์ง๋ค. -->
|
| 10 |
<style>
|
| 11 |
:root{
|
| 12 |
+
--bg:#f7f8fa; --bg2:#eef1f5; --card:#fff; --ink:#12141a; --ink2:#3c4351;
|
| 13 |
+
--muted:#6b7280; --line:#e4e7ec; --line2:#d3d8e0;
|
| 14 |
+
--acc:#2a4d8f; --acc2:#4d7fd6; --soft:#e8eff9;
|
| 15 |
+
--warn:#9a6a00; --warnbg:#fff5dc; --good:#15794c; --goodbg:#e4f5ec;
|
| 16 |
+
--bad:#a8352a; --badbg:#fdeceb;
|
| 17 |
+
--mono:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
|
| 18 |
+
--r:14px; --sh:0 1px 2px rgba(16,24,40,.04),0 1px 3px rgba(16,24,40,.06);
|
| 19 |
+
--sh2:0 4px 6px -1px rgba(16,24,40,.06),0 12px 20px -4px rgba(16,24,40,.08);
|
| 20 |
}
|
| 21 |
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]){
|
| 22 |
+
--bg:#0d0f13; --bg2:#12151b; --card:#161a21; --ink:#e9ecf1; --ink2:#c2c8d2;
|
| 23 |
+
--muted:#8d95a3; --line:#242932; --line2:#2f3540;
|
| 24 |
+
--acc:#7fa6ea; --acc2:#5b86d4; --soft:#141d2d;
|
| 25 |
+
--warn:#e2b451; --warnbg:#251f10; --good:#4ecb92; --goodbg:#0f2419;
|
| 26 |
+
--bad:#f08a7e; --badbg:#2a1512;
|
| 27 |
+
--sh:0 1px 2px rgba(0,0,0,.3); --sh2:0 8px 24px rgba(0,0,0,.4);}}
|
| 28 |
:root[data-theme="dark"]{
|
| 29 |
+
--bg:#0d0f13;--bg2:#12151b;--card:#161a21;--ink:#e9ecf1;--ink2:#c2c8d2;
|
| 30 |
+
--muted:#8d95a3;--line:#242932;--line2:#2f3540;--acc:#7fa6ea;--acc2:#5b86d4;
|
| 31 |
+
--soft:#141d2d;--warn:#e2b451;--warnbg:#251f10;--good:#4ecb92;--goodbg:#0f2419;
|
| 32 |
+
--bad:#f08a7e;--badbg:#2a1512;--sh:0 1px 2px rgba(0,0,0,.3);--sh2:0 8px 24px rgba(0,0,0,.4);}
|
| 33 |
*{box-sizing:border-box}
|
| 34 |
+
html{scroll-behavior:smooth}
|
| 35 |
+
body{margin:0;background:var(--bg);color:var(--ink);line-height:1.65;font-size:15px;
|
| 36 |
font-family:-apple-system,BlinkMacSystemFont,"Pretendard","Apple SD Gothic Neo",
|
| 37 |
+
"Malgun Gothic",Segoe UI,Roboto,sans-serif;-webkit-font-smoothing:antialiased;
|
| 38 |
+
text-rendering:optimizeLegibility}
|
| 39 |
+
.wrap{max-width:1000px;margin:0 auto;padding:0 22px}
|
| 40 |
+
a{color:var(--acc);text-decoration:none}
|
| 41 |
+
a:hover{text-decoration:underline}
|
| 42 |
+
.mono,code{font-family:var(--mono);font-variant-numeric:tabular-nums}
|
| 43 |
+
.dim{color:var(--muted)}
|
| 44 |
|
| 45 |
+
/* โโ nav โโ */
|
| 46 |
+
nav{position:sticky;top:0;z-index:20;background:color-mix(in srgb,var(--bg) 82%,transparent);
|
| 47 |
+
backdrop-filter:saturate(180%) blur(14px);border-bottom:1px solid var(--line)}
|
| 48 |
+
nav .in{max-width:1000px;margin:0 auto;padding:11px 22px;display:flex;align-items:center;gap:12px}
|
| 49 |
+
.lg{font-weight:800;letter-spacing:-.035em;font-size:17px;color:var(--ink)}
|
| 50 |
+
.lg:hover{text-decoration:none}
|
| 51 |
+
.lg i{color:var(--acc);font-style:normal}
|
| 52 |
+
.sp{flex:1}
|
| 53 |
+
.chip{font-size:11px;font-family:var(--mono);padding:3px 9px;border-radius:99px;
|
| 54 |
+
background:var(--soft);color:var(--acc);font-weight:700;letter-spacing:.02em}
|
| 55 |
+
.chip.g{background:transparent;border:1px solid var(--line2);color:var(--muted)}
|
| 56 |
+
.chip.ok{background:var(--goodbg);color:var(--good)}
|
| 57 |
+
.chip.wr{background:var(--warnbg);color:var(--warn)}
|
| 58 |
+
.chip.bd{background:var(--badbg);color:var(--bad)}
|
| 59 |
+
.btn{display:inline-flex;align-items:center;gap:7px;padding:9px 17px;border-radius:10px;
|
| 60 |
+
background:var(--acc);color:#fff;font-size:13.5px;font-weight:600;border:0;cursor:pointer;
|
| 61 |
+
transition:filter .15s,transform .1s}
|
| 62 |
+
.btn:hover{filter:brightness(1.08);text-decoration:none}
|
| 63 |
+
.btn:active{transform:translateY(1px)}
|
| 64 |
+
.btn:disabled{opacity:.5;cursor:default}
|
| 65 |
+
.btn.g{background:transparent;color:var(--acc);border:1px solid var(--line2)}
|
| 66 |
|
| 67 |
+
/* โโ hero โโ */
|
| 68 |
+
.hero{padding:66px 0 40px;position:relative;overflow:hidden}
|
| 69 |
+
.hero::before{content:"";position:absolute;inset:-40% -20% auto -20%;height:340px;
|
| 70 |
+
background:radial-gradient(ellipse at 30% 40%,color-mix(in srgb,var(--acc) 13%,transparent),transparent 62%);
|
| 71 |
+
pointer-events:none}
|
| 72 |
+
.hero > *{position:relative}
|
| 73 |
+
.brand{font-size:clamp(40px,8.5vw,68px);font-weight:850;letter-spacing:-.042em;
|
| 74 |
+
margin:0 0 2px;line-height:1}
|
| 75 |
+
.brand i{color:var(--acc);font-style:normal}
|
| 76 |
+
.sub{font-size:13.5px;color:var(--muted);margin:0;letter-spacing:.01em}
|
| 77 |
+
.tag{font-size:clamp(20px,3.6vw,28px);font-weight:700;margin:26px 0 8px;
|
| 78 |
+
letter-spacing:-.022em;line-height:1.38;max-width:18em}
|
| 79 |
+
.lede{font-size:16px;color:var(--ink2);margin:0;max-width:34em}
|
| 80 |
|
| 81 |
+
/* โโ stats โโ */
|
| 82 |
+
.stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(118px,1fr));gap:12px;margin:36px 0 0}
|
| 83 |
+
.stat{background:var(--card);border:1px solid var(--line);border-radius:12px;padding:15px 17px;
|
| 84 |
+
box-shadow:var(--sh)}
|
| 85 |
+
.stat b{display:block;font-size:27px;font-weight:800;font-family:var(--mono);
|
| 86 |
+
letter-spacing:-.03em;line-height:1.15}
|
| 87 |
+
.stat span{font-size:11.5px;color:var(--muted);letter-spacing:.01em}
|
| 88 |
|
| 89 |
+
h2{font-size:11.5px;font-weight:700;letter-spacing:.15em;text-transform:uppercase;
|
| 90 |
+
color:var(--acc);margin:56px 0 6px}
|
| 91 |
+
h2 + .h2s{font-size:14px;color:var(--muted);margin:0 0 20px}
|
| 92 |
+
h3{font-size:18px;font-weight:700;margin:30px 0 8px;letter-spacing:-.015em}
|
| 93 |
+
p{margin:0 0 15px}
|
| 94 |
|
| 95 |
+
/* โโ noise band (์๋ช
์๊ฐํ) โโ */
|
| 96 |
+
.band{background:var(--card);border:1px solid var(--line);border-radius:12px;
|
| 97 |
+
padding:16px 18px 12px;margin:12px 0;box-shadow:var(--sh)}
|
| 98 |
+
.band .hd{display:flex;align-items:baseline;gap:10px;margin-bottom:12px}
|
| 99 |
+
.band .hd b{font-size:15px}
|
| 100 |
+
.band .hd .r{margin-left:auto;font-family:var(--mono);font-size:12px;color:var(--muted)}
|
| 101 |
+
.axis{position:relative;height:46px;margin:0 4px}
|
| 102 |
+
.axis .line{position:absolute;left:0;right:0;top:22px;height:2px;background:var(--line2);border-radius:2px}
|
| 103 |
+
.axis .floor{position:absolute;left:0;top:12px;height:22px;border-radius:4px;
|
| 104 |
+
background:repeating-linear-gradient(135deg,color-mix(in srgb,var(--warn) 22%,transparent) 0 5px,transparent 5px 10px);
|
| 105 |
+
border-right:2px solid color-mix(in srgb,var(--warn) 65%,transparent)}
|
| 106 |
+
.axis .mk{position:absolute;top:9px;width:2px;height:28px;background:var(--acc);border-radius:2px;
|
| 107 |
+
transform:translateX(-1px)}
|
| 108 |
+
.axis .mk.b{background:var(--muted);opacity:.75}
|
| 109 |
+
.axis .mk::after{content:attr(data-l);position:absolute;top:31px;left:50%;transform:translateX(-50%);
|
| 110 |
+
font-family:var(--mono);font-size:10px;color:var(--muted);white-space:nowrap}
|
| 111 |
+
.axis .mk.top::after{top:-16px}
|
| 112 |
+
.bandnote{font-size:12px;color:var(--muted);margin-top:16px;display:flex;gap:14px;flex-wrap:wrap}
|
| 113 |
+
.bandnote i{font-style:normal;display:inline-flex;align-items:center;gap:5px}
|
| 114 |
+
.swatch{width:22px;height:9px;border-radius:2px;display:inline-block;
|
| 115 |
+
background:repeating-linear-gradient(135deg,color-mix(in srgb,var(--warn) 30%,transparent) 0 4px,transparent 4px 8px);
|
| 116 |
+
border:1px solid color-mix(in srgb,var(--warn) 45%,transparent)}
|
| 117 |
+
|
| 118 |
+
/* โโ cards โโ */
|
| 119 |
+
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(258px,1fr));gap:14px}
|
| 120 |
+
.cc{background:var(--card);border:1px solid var(--line);border-radius:var(--r);padding:19px;
|
| 121 |
+
display:block;box-shadow:var(--sh);transition:box-shadow .18s,transform .12s,border-color .18s}
|
| 122 |
+
a.cc:hover{box-shadow:var(--sh2);transform:translateY(-2px);border-color:var(--line2);text-decoration:none}
|
| 123 |
+
.cc.off{opacity:.55}
|
| 124 |
+
.cc .ico{font-size:23px;line-height:1}
|
| 125 |
+
.cc .nm{font-weight:700;font-size:16.5px;margin:9px 0 3px;color:var(--ink);
|
| 126 |
+
display:flex;align-items:center;gap:8px;flex-wrap:wrap}
|
| 127 |
+
.cc .ds{font-size:13px;color:var(--muted);line-height:1.55;min-height:40px}
|
| 128 |
+
.cc .mt{margin-top:13px;padding-top:11px;border-top:1px solid var(--line);
|
| 129 |
+
font-family:var(--mono);font-size:11.5px;color:var(--muted);
|
| 130 |
display:flex;justify-content:space-between;gap:8px}
|
|
|
|
|
|
|
|
|
|
| 131 |
|
| 132 |
+
/* โโ tabs โโ */
|
| 133 |
+
.crumb{font-size:13px;color:var(--muted);margin:26px 0 10px}
|
| 134 |
+
.ttl{font-size:clamp(26px,4.4vw,34px);font-weight:800;letter-spacing:-.028em;margin:0 0 5px;
|
| 135 |
+
display:flex;align-items:center;gap:11px;flex-wrap:wrap}
|
| 136 |
+
.tabs{display:flex;gap:5px;flex-wrap:wrap;margin:22px 0 4px;border-bottom:1px solid var(--line)}
|
| 137 |
+
.tab{padding:10px 16px;font-size:14px;font-weight:600;color:var(--muted);cursor:pointer;
|
| 138 |
border:0;background:none;border-bottom:2px solid transparent;margin-bottom:-1px}
|
| 139 |
+
.tab:hover{color:var(--ink2);text-decoration:none}
|
| 140 |
+
.tab.on{color:var(--acc);border-bottom-color:var(--acc)}
|
| 141 |
+
.pills{display:flex;gap:6px;flex-wrap:wrap;margin:18px 0 2px}
|
| 142 |
+
.pilltab{padding:7px 14px;border-radius:9px;font-size:13px;font-weight:600;
|
| 143 |
+
color:var(--muted);border:1px solid var(--line);background:var(--card)}
|
| 144 |
+
.pilltab:hover{text-decoration:none;color:var(--ink2)}
|
| 145 |
+
.pilltab.on{background:var(--acc);color:#fff;border-color:var(--acc)}
|
| 146 |
|
| 147 |
+
/* โโ table โโ */
|
| 148 |
+
.tw{overflow-x:auto;border:1px solid var(--line);border-radius:12px;background:var(--card);
|
| 149 |
+
box-shadow:var(--sh);margin:16px 0}
|
| 150 |
+
table{width:100%;border-collapse:collapse;font-size:13.5px}
|
| 151 |
+
th{text-align:right;font-weight:600;color:var(--muted);font-size:10.5px;letter-spacing:.07em;
|
| 152 |
+
text-transform:uppercase;padding:11px 12px;border-bottom:1px solid var(--line);white-space:nowrap}
|
| 153 |
+
th:first-child,td:first-child{text-align:center;width:44px}
|
| 154 |
+
th:nth-child(2),td:nth-child(2),th:nth-child(3),td:nth-child(3){text-align:left}
|
| 155 |
+
td{padding:12px;border-bottom:1px solid var(--line);text-align:right;
|
| 156 |
+
font-family:var(--mono);font-variant-numeric:tabular-nums;white-space:nowrap}
|
| 157 |
+
td:nth-child(2){font-family:inherit;font-weight:650}
|
| 158 |
+
tbody tr:last-child td{border-bottom:0}
|
| 159 |
+
tbody tr:hover td{background:var(--bg2)}
|
| 160 |
tr.base td{color:var(--muted)}
|
| 161 |
+
tr.base td:nth-child(2){font-weight:600}
|
| 162 |
+
.rk{display:inline-flex;width:23px;height:23px;align-items:center;justify-content:center;
|
| 163 |
+
border-radius:7px;background:var(--bg2);font-size:11.5px;font-weight:700}
|
| 164 |
+
.rk.g1{background:#f5c84c22;color:#a8820f}
|
| 165 |
+
.rk.g2{background:#b9c2cf22;color:#7a8698}
|
| 166 |
+
.rk.g3{background:#cd8a5a22;color:#9b6234}
|
| 167 |
+
|
| 168 |
.fig{background:var(--card);border:1px solid var(--line);border-radius:12px;padding:18px 20px;
|
| 169 |
+
margin:16px 0;font-family:var(--mono);font-size:13px;line-height:1.95;overflow-x:auto;
|
| 170 |
+
box-shadow:var(--sh)}
|
| 171 |
+
.fig .n{color:var(--acc);font-weight:700}
|
| 172 |
+
.note{background:var(--warnbg);border:1px solid color-mix(in srgb,var(--warn) 32%,transparent);
|
| 173 |
+
border-radius:11px;padding:14px 17px;font-size:14px;margin:16px 0;color:var(--ink2)}
|
| 174 |
+
.note.ok{background:var(--goodbg);border-color:color-mix(in srgb,var(--good) 30%,transparent)}
|
| 175 |
+
.kv{display:grid;grid-template-columns:160px 1fr;gap:9px 16px;font-size:14px;margin:14px 0}
|
| 176 |
.kv dt{color:var(--muted)}
|
| 177 |
+
.kv dd{margin:0;font-family:var(--mono);font-size:13px;word-break:break-word}
|
| 178 |
+
label{display:block;font-size:13.5px;font-weight:650;margin:16px 0 6px}
|
|
|
|
|
|
|
| 179 |
.hint{font-size:12px;color:var(--muted);font-weight:400}
|
| 180 |
+
input[type=text],textarea{width:100%;padding:11px 13px;border:1px solid var(--line2);
|
| 181 |
+
border-radius:10px;background:var(--card);color:var(--ink);font-family:var(--mono);font-size:13px}
|
| 182 |
+
input[type=text]:focus,textarea:focus{outline:2px solid color-mix(in srgb,var(--acc) 45%,transparent);
|
| 183 |
+
outline-offset:-1px;border-color:var(--acc)}
|
| 184 |
+
.drop{border:2px dashed var(--line2);border-radius:12px;padding:26px;text-align:center;
|
| 185 |
+
color:var(--muted);font-size:14px;cursor:pointer;transition:border-color .15s,background .15s}
|
| 186 |
+
.drop:hover,.drop.hot{border-color:var(--acc);background:var(--soft);color:var(--acc)}
|
| 187 |
+
.steps{counter-reset:s;list-style:none;padding:0;margin:16px 0}
|
| 188 |
+
.steps li{counter-increment:s;position:relative;padding:0 0 22px 42px;border-left:2px solid var(--line);
|
| 189 |
+
margin-left:14px}
|
| 190 |
+
.steps li:last-child{border-left-color:transparent;padding-bottom:0}
|
| 191 |
+
.steps li::before{content:counter(s);position:absolute;left:-15px;top:-2px;width:28px;height:28px;
|
| 192 |
+
border-radius:50%;background:var(--soft);color:var(--acc);font-weight:700;font-size:13px;
|
| 193 |
+
display:flex;align-items:center;justify-content:center;font-family:var(--mono);
|
| 194 |
+
border:2px solid var(--bg)}
|
| 195 |
+
.steps b{display:block;font-size:15.5px;margin-bottom:3px}
|
| 196 |
+
ol.cl{list-style:none;counter-reset:c;padding:0;margin:18px 0;
|
| 197 |
+
display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:0}
|
| 198 |
+
ol.cl li{counter-increment:c;position:relative;padding:15px 15px 15px 50px;border-top:1px solid var(--line)}
|
| 199 |
+
ol.cl li::before{content:counter(c);position:absolute;left:8px;top:15px;width:28px;height:28px;
|
| 200 |
+
border-radius:8px;background:var(--soft);color:var(--acc);font-weight:700;font-size:12.5px;
|
| 201 |
+
display:flex;align-items:center;justify-content:center;font-family:var(--mono)}
|
| 202 |
+
ol.cl b{display:block;font-size:15px;margin-bottom:2px}
|
| 203 |
+
ol.cl span{font-size:13px;color:var(--muted);line-height:1.5}
|
| 204 |
+
.skel{height:120px;border-radius:12px;background:linear-gradient(90deg,var(--bg2),var(--card),var(--bg2));
|
| 205 |
+
background-size:200% 100%;animation:sh 1.3s infinite}
|
| 206 |
+
@keyframes sh{0%{background-position:200% 0}100%{background-position:-200% 0}}
|
| 207 |
+
footer{margin-top:76px;padding:26px 0 60px;border-top:1px solid var(--line);
|
| 208 |
+
font-size:13px;color:var(--muted);display:flex;gap:18px;flex-wrap:wrap}
|
| 209 |
+
@media(max-width:640px){.kv{grid-template-columns:1fr}.kv dt{margin-top:8px}}
|
| 210 |
</style>
|
| 211 |
</head>
|
| 212 |
<body>
|
| 213 |
|
| 214 |
<nav><div class="in">
|
| 215 |
+
<a class="lg" href="#/">LEAD<i>BOARD</i></a>
|
| 216 |
+
<span class="chip g" id="spec">v1.1</span>
|
| 217 |
<span class="sp"></span>
|
| 218 |
+
<span id="who" style="font-size:13px;color:var(--muted)"></span>
|
| 219 |
</div></nav>
|
| 220 |
|
| 221 |
+
<div id="app"><div class="wrap"><div class="skel" style="margin-top:60px"></div></div></div>
|
| 222 |
|
| 223 |
+
<footer class="wrap">
|
| 224 |
<span>LEADBOARD ยท FINAL-Bench / VIDRAFT</span>
|
| 225 |
<a href="/api/health">API</a>
|
| 226 |
<a href="https://huggingface.co/spaces/FINAL-Bench/open-discovery-challenge">ODC</a>
|
|
|
|
| 228 |
</footer>
|
| 229 |
|
| 230 |
<script>
|
| 231 |
+
const $=s=>document.querySelector(s), app=$("#app");
|
| 232 |
+
const f=(x,d=3)=>(x==null||isNaN(x))?"โ":Number(x).toFixed(d);
|
| 233 |
+
const esc=s=>String(s??"").replace(/[&<>"]/g,c=>({"&":"&","<":"<",">":">",'"':"""}[c]));
|
| 234 |
+
let CATS=null, ME={user:null}, BOARDS={};
|
| 235 |
+
|
| 236 |
+
async function j(u,o){const r=await fetch(u,o);if(!r.ok)throw new Error(await r.text());return r.json();}
|
| 237 |
+
const W=h=>`<div class="wrap">${h}</div>`;
|
| 238 |
|
| 239 |
+
/* โโโโโโ ์๋ช
์๊ฐํ ยท ์ก์ ๋ฐ๋ฅ ์ถ โโโโโโ
|
| 240 |
+
MAE ์ถ ์์ ์คํ ์ค์ฐจ ๊ตฌ๊ฐ์ ๋น๊ธ์ผ๋ก ๊น๊ณ ๋ฐฉ๋ฒ๋ค์ ์ ์ผ๋ก ์ฐ๋๋ค.
|
| 241 |
+
๋น๊ธ ์์ชฝ์ "์คํ๋ณด๋ค ์ ๋ฐ" = ์ธก์ ์ผ๋ก ํ์ธํ ์ ์๋ ์์ญ์ด๋ค. */
|
| 242 |
+
function bandHTML(title, floor, marks, right){
|
| 243 |
+
const hi = Math.max(floor*1.35, ...marks.map(m=>m.v)) * 1.12;
|
| 244 |
+
const pc = v => Math.min(100, 100*v/hi);
|
| 245 |
+
return `<div class="band">
|
| 246 |
+
<div class="hd"><b>${esc(title)}</b>
|
| 247 |
+
<span class="chip wr">์ก์ ${f(floor)}</span>
|
| 248 |
+
<span class="r">${esc(right||"")}</span></div>
|
| 249 |
+
<div class="axis">
|
| 250 |
+
<div class="line"></div>
|
| 251 |
+
<div class="floor" style="width:${pc(floor)}%"></div>
|
| 252 |
+
${marks.map((m,i)=>`<div class="mk ${m.base?"b":""} ${i%2?"top":""}"
|
| 253 |
+
style="left:${pc(m.v)}%" data-l="${esc(m.l)} ${f(m.v)}"></div>`).join("")}
|
| 254 |
+
</div>
|
| 255 |
+
<div class="bandnote">
|
| 256 |
+
<i><span class="swatch"></span> ์คํ ์ค์ฐจ ๊ตฌ๊ฐ โ ์ด ์์ชฝ์ ์ธก์ ์ผ๋ก ํ์ธํ ์ ์๋ค</i>
|
| 257 |
+
<i style="margin-left:auto">MAE (log) โ</i>
|
| 258 |
+
</div></div>`;
|
| 259 |
+
}
|
| 260 |
|
| 261 |
async function boot(){
|
| 262 |
+
try{ME=await j("/api/me");}catch(e){}
|
| 263 |
$("#who").innerHTML = ME.user
|
| 264 |
? `${esc(ME.user.user)} ยท <a href="/logout">๋ก๊ทธ์์</a>`
|
| 265 |
+
: (ME.login_enabled?`<a href="/login?next=${encodeURIComponent(location.hash||"#/")}">HF ๋ก๊ทธ์ธ</a>`:"");
|
| 266 |
+
CATS=await j("/api/categories");
|
| 267 |
+
$("#spec").textContent=CATS.spec;
|
| 268 |
+
CATS.categories.forEach(c=>(c.board_cards||[]).forEach(b=>BOARDS[b.board]=b));
|
| 269 |
route();
|
| 270 |
}
|
| 271 |
+
addEventListener("hashchange",route);
|
|
|
|
| 272 |
function route(){
|
| 273 |
+
const p=(location.hash||"#/").slice(2).split("/").filter(Boolean);
|
| 274 |
+
scrollTo(0,0);
|
| 275 |
+
if(!p.length)return hub();
|
| 276 |
+
if(p[0]==="c")return category(p[1]);
|
| 277 |
+
if(p[0]==="b")return board(decodeURIComponent(p[1]),p[2]||"rank");
|
| 278 |
hub();
|
| 279 |
}
|
| 280 |
|
| 281 |
+
/* โโโโโโ ํ๋ธ โโโโโโ */
|
| 282 |
function hub(){
|
| 283 |
+
const t=CATS.totals, bs=Object.values(BOARDS).sort((a,b)=>b.n_test-a.n_test);
|
| 284 |
+
const lost=bs.filter(b=>b.beats_constant===false).length;
|
| 285 |
+
app.innerHTML=W(`
|
| 286 |
+
<div class="hero">
|
| 287 |
+
<h1 class="brand">LEAD<i>BOARD</i></h1>
|
| 288 |
<p class="sub">๋ฆฌ๋๋ณด๋ ยท AI ์ ์ฝ ์์ธก ๋๊ตฌ ์ํ๋</p>
|
| 289 |
+
<p class="tag">์ ์ฝ ์์ธก ๋๊ตฌ๋ฅผ,<br>๋ถ์ผ๋ณ๋ก, ๊ฐ์ ์ฃ๋๋ก ์ฐ๋ค.</p>
|
| 290 |
+
<p class="lede">์ ๋ต์ ๋๋ ์ฃผ์ง ์์ต๋๋ค. ๋์ <b>์๋ฌด๊ฒ๋ ํ์ตํ์ง ์์ ๊ธฐ์ค์ </b>๊ณผ
|
| 291 |
+
<b>๊ทธ ๋ถ์ผ์ ์คํ ์ค์ฐจ</b>๋ฅผ ๋จผ์ ๊ณต๊ฐํฉ๋๋ค. ๋ฏฟ์ด๋ฌ๋ผ๊ณ ํ์ง ์๊ณ , ํ์ธํ๊ฒ ํฉ๋๋ค.</p>
|
| 292 |
+
<div class="stats">
|
| 293 |
+
<div class="stat"><b>${t.open}</b><span>๊ฐ์ค ๋ถ๋ฌธ</span></div>
|
| 294 |
+
<div class="stat"><b>${t.planned}</b><span>๊ณํ ๋ถ๋ฌธ</span></div>
|
| 295 |
+
<div class="stat"><b>${CATS.categories.length}</b><span>์นดํ
๊ณ ๋ฆฌ</span></div>
|
| 296 |
+
<div class="stat"><b>8</b><span>๊ท๊ฒฉ ์กฐํญ</span></div>
|
| 297 |
+
</div>
|
| 298 |
</div>
|
| 299 |
+
|
| 300 |
+
<h2>์ธก์ ํ๊ณ</h2>
|
| 301 |
+
<p class="h2s">๊ฐ ๋ถ๋ฌธ์์ <b>์คํ์ ๋ค์ ํด๋ ์ด๋งํผ์ ํ๋ค๋ฆฐ๋ค</b>๋ ํญ(๋น๊ธ)๊ณผ,
|
| 302 |
+
ํ์ฌ ๊ธฐ์ค์ ์ด ์ด๋์ ์ ์๋์ง์
๋๋ค.</p>
|
| 303 |
+
${bs.map(b=>bandHTML(b.board,b.noise_floor.sd_single,
|
| 304 |
+
Object.entries(b.baselines).map(([k,v])=>({l:k,v:v.mae,base:true})),
|
| 305 |
+
`${b.split_grade}/${b.answer_grade} ยท ํ
์คํธ ${b.n_test.toLocaleString()}`)).join("")}
|
| 306 |
+
${lost?`<div class="note"><b>${lost}๊ฐ ๋ถ๋ฌธ์์ ํ์ต ๊ธฐ์ค์ ์ด ์์ ์์ธก์ ๋์ง ๋ชปํ์ต๋๋ค.</b>
|
| 307 |
+
์๋ฌด๊ฒ๋ ๋ฐฐ์ฐ์ง ์์ ์ชฝ์ด ๋ ์ ํํ๋ค๋ ๋ป์
๋๋ค.
|
| 308 |
+
๊ธฐ์ค์ ์ ํ์ ์์ฃผ์ํค์ง ์์ผ๋ฉด(3์กฐ) ์ด ์ฌ์ค์ ์ด๋์๋ ๋ํ๋์ง ์์ต๋๋ค.</div>`:""}
|
| 309 |
+
|
| 310 |
<h2>์นดํ
๊ณ ๋ฆฌ</h2>
|
| 311 |
+
<p class="h2s">๋ถ์ผ๋ฅผ ๊ณ ๋ฅด๋ฉด ๊ทธ ์์ ๋ถ๋ฌธ๊ณผ ์์ยท์ ์ถ๋ก ๋ค์ด๊ฐ๋๋ค.</p>
|
| 312 |
<div class="grid">${CATS.categories.map(cardHTML).join("")}</div>
|
| 313 |
+
|
| 314 |
+
<h2>์ฑ์ ์๊ฐ ์ค์ค๋ก์๊ฒ ๋ถ๊ณผํ๋ 8๊ฐ ์กฐํญ</h2>
|
| 315 |
+
<p class="h2s">์ฐธ๊ฐ์์๊ฒ ์๊ตฌํ๋ ๊ฒ์ด ์๋๋ผ, ์ฐ๋ฆฌ๊ฐ ์งํค๋ ๊ฒ์
๋๋ค.</p>
|
| 316 |
+
<ol class="cl">
|
| 317 |
+
${[["์ ๋ต์ ๋ฐฐํฌํ์ง ์๋๋ค","๋ถ๋ฌธ๋ง๋ค ๋ถํ ๋ฑ๊ธ๊ณผ ์ ๋ต ๋ฑ๊ธ์ ๊ณต์ํ๋ค"],
|
| 318 |
+
["์ ์๋ง๋ค ๋ ๊ฐ์ ์ง๋ฌธ","๋ฐ์ดํฐ ํ๋ณธ๊ณผ ์ฑ์ ์ฝ๋์ SHA-256"],
|
| 319 |
+
["๊ธฐ์ค์ ์ ํ์์ ๋ด๋ ค๊ฐ์ง ์๋๋ค","์์ ์์ธก ยท ์ต๊ทผ์ ์ด์ ยท Morgan+LightGBM ์๊ตฌ ๋ฑ์ฌ"],
|
| 320 |
+
["์ก์ ๋ฐ๋ฅ์ ๋จผ์ ๊ณต์ํ๋ค","๊ฐ์ ํํฉ๋ฌผ์ ๋ค๋ฅธ ๋
ผ๋ฌธ์์ ์ฐ ์ฐจ์ด๋ก ์ฐ์ถํ๋ค"],
|
| 321 |
+
["๋์ถ์ ๋งค ์ ์ถ๋ง๋ค ๊ฒ์ฌํ๋ค","์ ๋ต๊ณผ ์์์ ๊น์ง ๊ฐ์ ํญ๋ชฉ์ด ๋ฌด๋๊ธฐ๋ฉด ํ์ ์ ๋๋ค"],
|
| 322 |
+
["๊ฒฐ๊ณผ ์ ์ถ๊ณผ ๋ชจ๋ธ ์ ์ถ์ ๊ตฌ๋ถํ๋ค","์ฐ๋ฆฌ๊ฐ ์ง์ ๋๋ ค๋ณธ ๊ฒ๋ง [๊ฒ์ฆ๋จ]"],
|
| 323 |
+
["๋ฏธ์ฐ์ถ์ 0์ ์ด ์๋๋ค","์ธก์ ํ์ง ๋ชปํ ๊ฒ๊ณผ ์ธก์ ํด์ ๋์ ๊ฒ์ ๋ค๋ฅด๋ค"],
|
| 324 |
+
["๋ํ์ด ์ ์ถ๋ก๋ ์์๊ฐ ์ค๋ฅด์ง ์๋๋ค","Ladder ยท Blum & Hardt, ICML 2015"]]
|
| 325 |
+
.map(([a,b])=>`<li><b>${a}</b><span>${b}</span></li>`).join("")}
|
| 326 |
+
</ol>`);
|
| 327 |
}
|
| 328 |
|
| 329 |
function cardHTML(c){
|
| 330 |
+
const on=c.open>0, best=(c.board_cards||[]).sort((a,b)=>b.n_test-a.n_test)[0];
|
| 331 |
+
const inner=`<div class="ico">${c.icon}</div>
|
| 332 |
+
<div class="nm">${esc(c.name)}
|
| 333 |
+
<span class="chip ${on?"ok":"g"}">${on?c.open+" ๊ฐ์ค":"์ค๋น ์ค"}</span></div>
|
|
|
|
| 334 |
<div class="ds">${esc(c.desc)}</div>
|
| 335 |
<div class="mt"><span>๋ถ๋ฌธ ${c.planned}</span>
|
| 336 |
+
<span>${best?`${esc(best.board)} ยท ์ก์ ${f(best.noise_floor.sd_single)}`:"โ"}</span></div>`;
|
| 337 |
+
return on?`<a class="cc" href="#/c/${c.id}">${inner}</a>`:`<div class="cc off">${inner}</div>`;
|
|
|
|
| 338 |
}
|
| 339 |
|
| 340 |
+
/* โโโโโโ ์นดํ
๊ณ ๋ฆฌ โโโโโโ */
|
| 341 |
function category(id){
|
| 342 |
+
const c=CATS.categories.find(x=>x.id===id); if(!c)return hub();
|
| 343 |
+
const bs=c.board_cards||[];
|
| 344 |
+
app.innerHTML=W(`
|
|
|
|
| 345 |
<div class="crumb"><a href="#/">์ ์ฒด</a> โบ ${esc(c.name)}</div>
|
| 346 |
+
<h1 class="ttl">${c.icon} ${esc(c.name)}</h1>
|
| 347 |
+
<p class="lede">${esc(c.desc)}</p>
|
| 348 |
+
<div class="stats" style="margin-top:22px">
|
| 349 |
+
<div class="stat"><b>${c.open}</b><span>๊ฐ์ค ๋ถ๋ฌธ</span></div>
|
| 350 |
+
<div class="stat"><b>${c.planned}</b><span>๊ณํ ๋ถ๋ฌธ</span></div>
|
| 351 |
+
<div class="stat"><b>${bs.reduce((s,b)=>s+b.n_test,0).toLocaleString()}</b><span>ํ
์คํธ ํํฉ๋ฌผ</span></div>
|
| 352 |
+
</div>
|
| 353 |
+
${bs.length?`<h2>๋ถ๋ฌธ</h2><div class="grid">${bs.map(boardMini).join("")}</div>
|
| 354 |
+
<h2>์ธก์ ํ๊ณ</h2>
|
| 355 |
+
${bs.map(b=>bandHTML(b.board,b.noise_floor.sd_single,
|
| 356 |
+
Object.entries(b.baselines).map(([k,v])=>({l:k,v:v.mae,base:true})),
|
| 357 |
+
`ํ
์คํธ ${b.n_test.toLocaleString()}`)).join("")}`
|
| 358 |
+
:`<div class="note">์ด ์นดํ
๊ณ ๋ฆฌ๋ ์์ง ๊ฐ์ค๋ ๋ถ๋ฌธ์ด ์์ต๋๋ค.
|
| 359 |
+
ํ๋์์๊ณผ ์ก์ ๋ฐ๋ฅ์ด ์ค๋น๋๋ ๋๋ก ์ฝ๋๋ค.</div>`}`);
|
| 360 |
}
|
|
|
|
| 361 |
function boardMini(b){
|
| 362 |
+
const bl=b.baselines[b.best_baseline]||{};
|
| 363 |
return `<a class="cc" href="#/b/${encodeURIComponent(b.board)}">
|
| 364 |
+
<div class="nm">${esc(b.board)}<span class="chip">${b.split_grade}/${b.answer_grade}</span></div>
|
|
|
|
| 365 |
<div class="ds">ํ
์คํธ ${b.n_test.toLocaleString()}๊ฐ ยท ์ก์ ๋ฐ๋ฅ ${f(b.noise_floor.sd_single)}<br>
|
| 366 |
+
์ต์ ๊ธฐ์ค์ <b>${esc(b.best_baseline)}</b> ${f(bl.mae)}</div>
|
| 367 |
<div class="mt"><span>${esc(b.source)}</span><span>์ค์ฐจรท์ก์ ${f(b.error_over_noise,2)}ร</span></div></a>`;
|
| 368 |
}
|
| 369 |
|
| 370 |
+
/* โโโโโโ ๋ถ๋ฌธ โโโโโโ */
|
| 371 |
+
async function board(name,tab){
|
| 372 |
+
const b=BOARDS[name]||await j("/api/board/"+encodeURIComponent(name));
|
| 373 |
+
const cat=CATS.categories.find(c=>(c.boards||[]).includes(name));
|
| 374 |
+
const T=[["rank","์์"],["submit","์ ์ถ"],["info","๋ถ๋ฌธ ์ ๋ณด"]];
|
| 375 |
+
app.innerHTML=W(`
|
| 376 |
<div class="crumb"><a href="#/">์ ์ฒด</a> โบ <a href="#/c/${cat?cat.id:""}">${esc(cat?cat.name:"")}</a> โบ ${esc(b.board)}</div>
|
| 377 |
+
<h1 class="ttl">${esc(b.board)}<span class="chip">${b.split_grade}/${b.answer_grade}</span></h1>
|
| 378 |
+
<p class="lede">${esc(b.source)} ยท ${esc(b.target)} ยท ${esc(b.type)} ยท
|
| 379 |
+
ํ
์คํธ <b>${b.n_test.toLocaleString()}</b>๊ฐ ยท ์ก์ ๋ฐ๋ฅ <b>${f(b.noise_floor.sd_single)}</b> log</p>
|
| 380 |
+
<div class="pills">${T.map(([k,l])=>
|
| 381 |
+
`<a class="pilltab ${k===tab?"on":""}" href="#/b/${encodeURIComponent(name)}/${k}">${l}</a>`).join("")}</div>
|
| 382 |
+
<div id="pane"><div class="skel" style="margin-top:18px"></div></div>`);
|
| 383 |
+
if(tab==="rank")return paneRank(b);
|
| 384 |
+
if(tab==="submit")return paneSubmit(b);
|
|
|
|
| 385 |
paneInfo(b);
|
| 386 |
}
|
| 387 |
|
| 388 |
async function paneRank(b){
|
| 389 |
+
const d=await j(`/api/board/${encodeURIComponent(b.board)}/leaderboard`);
|
| 390 |
+
const nf=d.noise_floor, ent=d.rows.filter(r=>r.kind!=="baseline");
|
| 391 |
+
const leakChip=l=>({high:'<span class="chip bd">์กฐํ ํ์ </span>',
|
| 392 |
+
elevated:'<span class="chip wr">๊ทผ์ ๊ณผ๋ฐ</span>'}[l]||'<span class="chip g">โ</span>');
|
| 393 |
+
const rows=d.rows.map(r=>{
|
| 394 |
+
const g=r.rank&&r.rank<=3?` g${r.rank}`:"";
|
| 395 |
+
return `<tr class="${r.kind==="baseline"?"base":""}">
|
| 396 |
+
<td>${r.rank?`<span class="rk${g}">${r.rank}</span>`:"ยท"}</td>
|
| 397 |
+
<td>${esc(r.method)}</td><td>${esc(r.user)}</td>
|
| 398 |
<td>${f(r.mae)}</td><td>${f(r.auroc)}</td><td>${f(r.prauc)}</td>
|
| 399 |
+
<td>${r.kind==="baseline"?'<span class="chip g">๊ธฐ์ค์ </span>':leakChip(r.leak)}</td>
|
| 400 |
+
<td>${r.kind==="baseline"?"โ":(r.verified?'<span class="chip ok">๊ฒ์ฆ๋จ</span>'
|
| 401 |
+
:'<span class="chip g">์ ์ถ๋จ</span>')}</td></tr>`;}).join("");
|
| 402 |
+
$("#pane").innerHTML=`
|
| 403 |
+
${bandHTML(b.board+" โ ํ์ฌ ์์ ์งํ", nf,
|
| 404 |
+
d.rows.map(r=>({l:r.kind==="baseline"?r.method:r.user, v:r.mae, base:r.kind==="baseline"})),
|
| 405 |
+
`${ent.length}๊ฑด ์ฐธ๊ฐ`)}
|
| 406 |
<div class="tw"><table>
|
| 407 |
+
<thead><tr><th>#</th><th>๋ฐฉ๋ฒ</th><th>์ ์ถ์</th><th>MAE</th><th>AUROC</th>
|
| 408 |
+
<th>PR-AUC</th><th>๋์ถ</th><th>๋ฑ๊ธ</th></tr></thead>
|
| 409 |
<tbody>${rows}</tbody></table></div>
|
| 410 |
+
<div class="note"><b>์ก์ ๋ฐ๋ฅ ${f(nf)} log.</b> ๋น๊ธ ์์ชฝ์ ์คํ์ ๋ค์ ํด๋ ๊ทธ๋งํผ ํ๋ค๋ฆฌ๋ ๊ตฌ๊ฐ์ด๋ผ,
|
| 411 |
+
๊ทธ ํญ ์์ ์ฐจ์ด๋ <b>์์ ์ฐจ์ด๋ก ์ฃผ์ฅํ์ง ์์ต๋๋ค</b> (4์กฐ).
|
| 412 |
๊ธฐ์ค์ 3์ข
์ ํ์์ ๋ด๋ ค๊ฐ์ง ์์ต๋๋ค (3์กฐ).</div>
|
| 413 |
+
${ent.length?`<p class="dim" style="font-size:13px">์์ ๊ฐฑ์ ${new Date(d.updated*1000).toLocaleString("ko-KR")}</p>`
|
| 414 |
+
:`<p class="dim" style="font-size:13px">์์ง ์ฐธ๊ฐ ์ ์ถ์ด ์์ต๋๋ค. ํ์ ์๋ ๊ฒ์ ๊ธฐ์ค์ ๋ฟ์
๋๋ค.</p>`}`;
|
| 415 |
}
|
| 416 |
|
| 417 |
function paneInfo(b){
|
| 418 |
+
const nf=b.noise_floor,bl=b.baselines;
|
| 419 |
+
$("#pane").innerHTML=`
|
| 420 |
<h3>๋ฑ๊ธ</h3>
|
| 421 |
<dl class="kv">
|
| 422 |
+
<dt>๋ถํ ๋ฑ๊ธ <b>${b.split_grade}</b></dt><dd>${esc(b.split_grade_note||"")}</dd>
|
| 423 |
+
<dt>์ ๋ต ๋ฑ๊ธ <b>${b.answer_grade}</b></dt><dd>${esc(b.answer_grade_note||"")}</dd>
|
| 424 |
</dl>
|
| 425 |
<h3>ํ๋์์</h3>
|
| 426 |
<dl class="kv">
|
| 427 |
<dt>์ถ์ฒ</dt><dd>${esc(b.source)} ยท ${esc(b.target)} ยท ${esc(b.type)}</dd>
|
| 428 |
+
<dt>๋ถํ ๊ธฐ์ค์ผ</dt><dd>${b.cut} โ ์ต์ด ๋ณด๊ณ ์ฐ๋</dd>
|
| 429 |
<dt>ํ๋ จ / ํ
์คํธ</dt><dd>${b.n_train.toLocaleString()} / ${b.n_test.toLocaleString()}</dd>
|
| 430 |
<dt>๊ตฌ์กฐ ๊ฒน์นจ</dt><dd>0 (์๊ฐ๋ถํ ์ ์์)</dd>
|
| 431 |
<dt>๋ถ๋ฅ ์๊ณ</dt><dd>p > ${b.threshold} ยท ์์ฑ ${(b.positive_rate*100).toFixed(1)}%</dd>
|
| 432 |
<dt>๋ฐ์ดํฐ ์ง๋ฌธ</dt><dd>${esc(b.dataset_sha)}</dd>
|
| 433 |
</dl>
|
| 434 |
+
<h3>์ก์ ๋ฐ๋ฅ <span class="dim" style="font-weight:400;font-size:14px">(4์กฐ)</span></h3>
|
| 435 |
<div class="fig">
|
| 436 |
+
๊ฐ์ ํํฉ๋ฌผ์ <b>์๋ก ๋ค๋ฅธ ๋
ผ๋ฌธ</b>์์ ์ฐ ์ฐจ์ด<br>
|
| 437 |
+
๋น๊ต์ <span class="n">${nf.pairs.toLocaleString()}</span> ยท ํํฉ๋ฌผ <span class="n">${nf.compounds.toLocaleString()}</span><br>
|
| 438 |
์ค์๊ฐ ${f(nf.median)} ยท ํ๊ท ${f(nf.mean)} ยท 90๋ถ์ ${f(nf.p90)}<br>
|
| 439 |
<b>๋จ์ผ ์ธก์ SD ์ถ์ <span class="n">${f(nf.sd_single)}</span> log</b>
|
| 440 |
</div>
|
| 441 |
+
<div class="note">๋ถ๋ฅ ์๊ณ์ ์์ ์คํ ์ค์ฐจ ํ ์นธ ์์ ์๋ ํ
์คํธ ํํฉ๋ฌผ์ด <b>${b.near_pct}%</b> ์
๋๋ค.
|
| 442 |
+
${b.near_pct>45?"์ ๋ฐ ๊ฐ๊น์ด๊ฐ ์ฌ์ธก์ ํ๋ฉด ๋ผ๋ฒจ์ด ๋ค์งํ ์ ์์ด <b>ํ๊ท๋ฅผ ์ฃผ์งํ</b>๋ก ๋ก๋๋ค."
|
| 443 |
+
:"๋ถ๋ฅ ์งํ๋ฅผ ํจ๊ป ์๋๋ค."}</div>
|
| 444 |
+
<h3>๊ธฐ์ค์ <span class="dim" style="font-weight:400;font-size:14px">(3์กฐ)</span></h3>
|
| 445 |
+
${bandHTML("๊ธฐ์ค์ ์์น",nf.sd_single,
|
| 446 |
+
Object.entries(bl).map(([k,v])=>({l:k,v:v.mae,base:true})),"")}
|
| 447 |
+
<div class="tw"><table><thead><tr><th style="width:auto"></th><th>๊ธฐ์ค์ </th><th>MAE</th>
|
| 448 |
+
<th>AUROC</th><th>PR-AUC</th></tr></thead><tbody>
|
| 449 |
+
${Object.entries(bl).map(([k,v])=>`<tr><td>ยท</td><td>${esc(k)}</td><td>${f(v.mae)}</td>
|
| 450 |
+
<td>${f(v.auroc)}</td><td>${f(v.prauc)}</td></tr>`).join("")}
|
| 451 |
+
<tr class="base"><td>ยท</td><td>์คํ ์ก์ ๋ฐ๋ฅ</td><td>${f(nf.sd_single)}</td><td>โ</td><td>โ</td></tr>
|
| 452 |
</tbody></table></div>
|
| 453 |
+
<div class="note ${b.beats_constant?"ok":""}">${b.beats_constant
|
| 454 |
? "ํ์ต ๊ธฐ์ค์ ๏ฟฝ๏ฟฝ ์์ ์์ธก์ ๋์์ต๋๋ค."
|
| 455 |
+
: "<b>ํ์ต ๊ธฐ์ค์ ์ด ์์ ์์ธก์ ๋์ง ๋ชปํ์ต๋๋ค.</b> ์๋ฌด๊ฒ๋ ๋ฐฐ์ฐ์ง ์์ ์ชฝ์ด ๋ ์ ํํ์ต๋๋ค."}</div>`;
|
| 456 |
}
|
| 457 |
|
| 458 |
function paneSubmit(b){
|
| 459 |
+
const url=`/api/board/${encodeURIComponent(b.board)}/testset`;
|
| 460 |
+
$("#pane").innerHTML=`
|
| 461 |
+
<ol class="steps">
|
| 462 |
+
<li><b>ํ
์คํธ์
๋ฐ๊ธฐ</b>
|
| 463 |
+
<p class="dim" style="font-size:13.5px">ํํฉ๋ฌผ <b>${b.n_test.toLocaleString()}๊ฐ</b>์ ๊ตฌ์กฐ(SMILES)๋ง
|
| 464 |
+
๋ค์ด ์์ต๋๋ค. ๋ผ๋ฒจ์ ์ด ์๋ฒ์ ์กด์ฌํ์ง ์์ต๋๋ค.</p>
|
| 465 |
+
<a class="btn" href="${url}" download>ํ
์คํธ์
๋ด๋ ค๋ฐ๊ธฐ</a>
|
| 466 |
+
<span class="hint"> ${esc(b.board.toLowerCase())}_test.json</span></li>
|
| 467 |
+
<li><b>์์ธก ์ฌ๋ฆฌ๊ธฐ</b>
|
| 468 |
+
${ME.user?`
|
| 469 |
+
<label>๋ฐฉ๋ฒ ์ด๋ฆ <span class="hint">์์ํ์ ์ด๋ ๊ฒ ํ์๋ฉ๋๋ค</span></label>
|
| 470 |
+
<input type="text" id="m" placeholder="์: my-gnn-ensemble-v2" maxlength="60">
|
| 471 |
+
<label>ํ์ต์ ์ด ๋ฐ์ดํฐ <span class="hint">5์กฐ ๋์ถ ๊ฒ์ฌ์ ์๋๋ค</span></label>
|
| 472 |
+
<input type="text" id="td" placeholder="์: ChEMBL34 + ์ฌ๋ด ๋ฐ์ดํฐ">
|
| 473 |
+
<label>์์ธก๊ฐ <span class="hint">JSON {"LB-โฆ": 6.42} ๋๋ CSV compound_id,prediction โ p ์ค์ผ์ผ(โlog10 M)</span></label>
|
| 474 |
+
<div class="drop" id="drop">ํ์ผ์ ์ฌ๊ธฐ์ ๋์ด๋ค ๋๊ฑฐ๋ ๋๋ฌ์ ๊ณ ๋ฅด์ธ์
|
| 475 |
+
<input type="file" id="file" accept=".json,.csv,.txt" hidden></div>
|
| 476 |
+
<textarea id="p" rows="6" style="margin-top:10px"
|
| 477 |
+
placeholder='{"LB-A1B2C3D4E5F6": 6.42, "LB-โฆ": 5.10}'></textarea>
|
| 478 |
+
<p style="margin-top:14px"><button class="btn" id="go">์ ์ถ</button>
|
| 479 |
+
<span class="hint" id="msg"></span></p>`
|
| 480 |
+
:`<div class="note">์ ์ถํ๋ ค๋ฉด HF ๊ณ์ ์ผ๋ก ๋ก๊ทธ์ธํด์ผ ํฉ๋๋ค.
|
| 481 |
+
<a href="/login?next=${encodeURIComponent(location.hash)}">๋ก๊ทธ์ธ</a></div>`}</li>
|
| 482 |
+
<li><b>์ปจํ
์ด๋๊น์ง ์ฌ๋ฆฌ๋ฉด (์ ํ)</b>
|
| 483 |
+
<p class="dim" style="font-size:13.5px">๋ชจ๋ธ๊ณผ ์ถ๋ก ํ๊ฒฝ์ ํจ๊ป ์ ์ถํ๋ฉด <b>์ฐ๋ฆฌ๊ฐ ์ง์ ๋๋ ค</b>
|
| 484 |
+
๊ฐ์ ์ซ์๊ฐ ๋์ค๋์ง ํ์ธํ๊ณ <span class="chip ok">๊ฒ์ฆ๋จ</span> ํ์๋ฅผ ๋ถ์
๋๋ค (6์กฐ).</p></li>
|
| 485 |
+
</ol>
|
| 486 |
+
<div class="note"><b>8์กฐ.</b> ๋ํ์ด ์ ์ถ๋ก๋ ์์๊ฐ ์ค๋ฅด์ง ์์ต๋๋ค.
|
| 487 |
+
์ง์ ์ต๊ณ ์ ์ ์ก์ ๋ฐ๋ฅ <b>${f(b.noise_floor.sd_single)}</b> ์ด์์ผ๋ก ๋์์ ๋๋ง
|
| 488 |
+
์ ์ ์๊ฐ ๊ณต๊ฐ๋ฉ๋๋ค. ํ๋ฃจ ์ ์ถ ํ๋ ${ME.daily_cap||5}ํ.</div>`;
|
| 489 |
+
wireSubmit(b);
|
| 490 |
+
}
|
| 491 |
+
|
| 492 |
+
function parsePred(txt){
|
| 493 |
+
txt=txt.trim();
|
| 494 |
+
if(txt.startsWith("{"))return JSON.parse(txt);
|
| 495 |
+
const out={};
|
| 496 |
+
txt.split(/\r?\n/).forEach((ln,i)=>{
|
| 497 |
+
const p=ln.split(/[,\t]/); if(p.length<2)return;
|
| 498 |
+
const k=p[0].trim(); if(!k||(i===0&&isNaN(parseFloat(p[1]))))return;
|
| 499 |
+
const v=parseFloat(p[1]); if(!isNaN(v))out[k]=v;
|
| 500 |
+
});
|
| 501 |
+
if(!Object.keys(out).length)throw new Error("์ฝ์ ์ ์๋ ํญ๋ชฉ์ด ์์ต๋๋ค");
|
| 502 |
+
return out;
|
| 503 |
+
}
|
| 504 |
+
|
| 505 |
+
function wireSubmit(b){
|
| 506 |
+
const drop=$("#drop"),file=$("#file"),ta=$("#p"),go=$("#go");
|
| 507 |
+
if(drop){
|
| 508 |
+
drop.onclick=()=>file.click();
|
| 509 |
+
file.onchange=e=>{const f0=e.target.files[0];if(!f0)return;
|
| 510 |
+
const r=new FileReader();r.onload=()=>{ta.value=r.result;
|
| 511 |
+
drop.textContent=`${f0.name} โ ${(f0.size/1024).toFixed(0)} KB ์ฝ์`;};r.readAsText(f0);};
|
| 512 |
+
["dragenter","dragover"].forEach(ev=>drop.addEventListener(ev,e=>{
|
| 513 |
+
e.preventDefault();drop.classList.add("hot");}));
|
| 514 |
+
["dragleave","drop"].forEach(ev=>drop.addEventListener(ev,e=>{
|
| 515 |
+
e.preventDefault();drop.classList.remove("hot");}));
|
| 516 |
+
drop.addEventListener("drop",e=>{const f0=e.dataTransfer.files[0];if(!f0)return;
|
| 517 |
+
const r=new FileReader();r.onload=()=>{ta.value=r.result;
|
| 518 |
+
drop.textContent=`${f0.name} โ ${(f0.size/1024).toFixed(0)} KB ์ฝ์`;};r.readAsText(f0);});
|
| 519 |
+
}
|
| 520 |
+
if(!go)return;
|
| 521 |
+
go.onclick=async()=>{
|
| 522 |
+
const msg=$("#msg");let preds;
|
| 523 |
+
try{preds=parsePred(ta.value);}catch(e){msg.textContent="์์ธก๊ฐ์ ์ฝ์ง ๋ชปํ์ต๋๋ค: "+e.message;return;}
|
| 524 |
+
msg.textContent=`${Object.keys(preds).length.toLocaleString()}๊ฐ ํญ๋ชฉ ยท ๋ณด๋ด๋ ์คโฆ`;go.disabled=true;
|
| 525 |
try{
|
| 526 |
+
const r=await j("/api/submit",{method:"POST",headers:{"Content-Type":"application/json"},
|
| 527 |
+
body:JSON.stringify({board:b.board,method:($("#m").value||"").trim(),
|
| 528 |
+
predictions:preds,training_data:($("#td").value||"").trim()})});
|
| 529 |
+
msg.innerHTML=`์ ์ ์๋ฃ ยท ์ ์ถ ๋ฒํธ <code>${esc(r.submission_id)}</code>`;
|
| 530 |
+
}catch(e){let t=String(e.message||e);try{t=JSON.parse(t).detail||t;}catch(_){}msg.textContent=t;}
|
| 531 |
+
go.disabled=false;
|
|
|
|
|
|
|
|
|
|
|
|
|
| 532 |
};
|
| 533 |
}
|
| 534 |
|
| 535 |
+
boot().catch(e=>{app.innerHTML=W(`<div class="note" style="margin-top:40px">
|
| 536 |
+
ํ๋ฉด์ ๋ถ๋ฌ์ค์ง ๋ชปํ์ต๋๋ค. ${esc(e.message||e)}</div>`);});
|
| 537 |
</script>
|
| 538 |
</body>
|
| 539 |
</html>
|