Spaces:
Running
Running
feat: render leaderboards from data/leaderboard.json with static fallback
Browse files- index.html +80 -12
index.html
CHANGED
|
@@ -173,11 +173,11 @@
|
|
| 173 |
</div>
|
| 174 |
<div class="mb-6">
|
| 175 |
<div class="font-mono text-[10px] text-on-surface-variant uppercase tracking-[0.15em] mb-2">Top model</div>
|
| 176 |
-
<div class="text-infinite-blue font-bold text-xl leading-tight">Claude Opus 4.5</div>
|
| 177 |
-
<div class="text-on-surface-variant text-sm font-medium">Anthropic</div>
|
| 178 |
</div>
|
| 179 |
<div class="bg-[#f0f9f3] border-l-4 border-wasabi-green rounded-xl p-4 flex items-center gap-3 mb-8">
|
| 180 |
-
<span class="text-infinite-blue font-bold text-3xl tabular-nums leading-none">37.4<span class="text-on-surface-variant text-lg font-medium ml-0.5">%</span></span>
|
| 181 |
<span class="font-mono text-[10px] text-on-surface-variant uppercase tracking-wider font-medium">Task Success Rate 路 Oracle mode</span>
|
| 182 |
<span class="tooltip">
|
| 183 |
<button type="button" class="tooltip-trigger" aria-label="Task Success Rate definition" aria-describedby="tt-eog-metric">
|
|
@@ -186,7 +186,7 @@
|
|
| 186 |
<span class="tooltip-bubble" role="tooltip" id="tt-eog-metric">A task passes only if all verification conditions are met.</span>
|
| 187 |
</span>
|
| 188 |
</div>
|
| 189 |
-
<div class="space-y-4">
|
| 190 |
<!-- Runner 2 -->
|
| 191 |
<div class="grid grid-cols-[20px_1fr_100px_45px] items-center gap-3">
|
| 192 |
<span class="text-on-surface-variant text-xs tabular-nums font-medium">2</span>
|
|
@@ -261,12 +261,12 @@
|
|
| 261 |
</div>
|
| 262 |
<div class="bg-[#f2f0ff] border-l-4 border-bright-indigo rounded-lg p-3 flex justify-between items-center mb-3">
|
| 263 |
<div>
|
| 264 |
-
<div class="text-infinite-blue font-bold text-base leading-tight">Nova + GPT-5.4 + Sonic</div>
|
| 265 |
-
<div class="text-on-surface-variant text-[11px] font-medium">Mixed Models 路 Cascade</div>
|
| 266 |
</div>
|
| 267 |
-
<span class="text-infinite-blue font-bold text-2xl tabular-nums">0.41</span>
|
| 268 |
</div>
|
| 269 |
-
<div class="space-y-2.5">
|
| 270 |
<div class="grid grid-cols-[18px_1fr_80px_35px] items-center gap-2 text-xs">
|
| 271 |
<span class="text-on-surface-variant tabular-nums font-medium">2</span>
|
| 272 |
<span class="text-on-surface font-medium truncate">Claude Opus 4.5</span>
|
|
@@ -317,12 +317,12 @@
|
|
| 317 |
</div>
|
| 318 |
<div class="bg-[#f0f9ff] border-l-4 border-bright-blue rounded-lg p-3 flex justify-between items-center mb-3">
|
| 319 |
<div>
|
| 320 |
-
<div class="text-infinite-blue font-bold text-base leading-tight">Gemini Live</div>
|
| 321 |
-
<div class="text-on-surface-variant text-[11px] font-medium">Google 路 Speech-to-Speech</div>
|
| 322 |
</div>
|
| 323 |
-
<span class="text-infinite-blue font-bold text-2xl tabular-nums">0.49</span>
|
| 324 |
</div>
|
| 325 |
-
<div class="space-y-2.5">
|
| 326 |
<div class="grid grid-cols-[18px_1fr_80px_35px] items-center gap-2 text-xs">
|
| 327 |
<span class="text-on-surface-variant tabular-nums font-medium">2</span>
|
| 328 |
<span class="text-on-surface font-medium truncate">GPT-Realtime</span>
|
|
@@ -373,5 +373,73 @@
|
|
| 373 |
</p>
|
| 374 |
</footer>
|
| 375 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 376 |
</body>
|
| 377 |
</html>
|
|
|
|
| 173 |
</div>
|
| 174 |
<div class="mb-6">
|
| 175 |
<div class="font-mono text-[10px] text-on-surface-variant uppercase tracking-[0.15em] mb-2">Top model</div>
|
| 176 |
+
<div id="eog-top-name" class="text-infinite-blue font-bold text-xl leading-tight">Claude Opus 4.5</div>
|
| 177 |
+
<div id="eog-top-org" class="text-on-surface-variant text-sm font-medium">Anthropic</div>
|
| 178 |
</div>
|
| 179 |
<div class="bg-[#f0f9f3] border-l-4 border-wasabi-green rounded-xl p-4 flex items-center gap-3 mb-8">
|
| 180 |
+
<span id="eog-top-score" class="text-infinite-blue font-bold text-3xl tabular-nums leading-none">37.4<span class="text-on-surface-variant text-lg font-medium ml-0.5">%</span></span>
|
| 181 |
<span class="font-mono text-[10px] text-on-surface-variant uppercase tracking-wider font-medium">Task Success Rate 路 Oracle mode</span>
|
| 182 |
<span class="tooltip">
|
| 183 |
<button type="button" class="tooltip-trigger" aria-label="Task Success Rate definition" aria-describedby="tt-eog-metric">
|
|
|
|
| 186 |
<span class="tooltip-bubble" role="tooltip" id="tt-eog-metric">A task passes only if all verification conditions are met.</span>
|
| 187 |
</span>
|
| 188 |
</div>
|
| 189 |
+
<div id="eog-runners" class="space-y-4">
|
| 190 |
<!-- Runner 2 -->
|
| 191 |
<div class="grid grid-cols-[20px_1fr_100px_45px] items-center gap-3">
|
| 192 |
<span class="text-on-surface-variant text-xs tabular-nums font-medium">2</span>
|
|
|
|
| 261 |
</div>
|
| 262 |
<div class="bg-[#f2f0ff] border-l-4 border-bright-indigo rounded-lg p-3 flex justify-between items-center mb-3">
|
| 263 |
<div>
|
| 264 |
+
<div id="eva-acc-name" class="text-infinite-blue font-bold text-base leading-tight">Nova + GPT-5.4 + Sonic</div>
|
| 265 |
+
<div id="eva-acc-sub" class="text-on-surface-variant text-[11px] font-medium">Mixed Models 路 Cascade</div>
|
| 266 |
</div>
|
| 267 |
+
<span id="eva-acc-score" class="text-infinite-blue font-bold text-2xl tabular-nums">0.41</span>
|
| 268 |
</div>
|
| 269 |
+
<div id="eva-acc-runners" class="space-y-2.5">
|
| 270 |
<div class="grid grid-cols-[18px_1fr_80px_35px] items-center gap-2 text-xs">
|
| 271 |
<span class="text-on-surface-variant tabular-nums font-medium">2</span>
|
| 272 |
<span class="text-on-surface font-medium truncate">Claude Opus 4.5</span>
|
|
|
|
| 317 |
</div>
|
| 318 |
<div class="bg-[#f0f9ff] border-l-4 border-bright-blue rounded-lg p-3 flex justify-between items-center mb-3">
|
| 319 |
<div>
|
| 320 |
+
<div id="eva-exp-name" class="text-infinite-blue font-bold text-base leading-tight">Gemini Live</div>
|
| 321 |
+
<div id="eva-exp-sub" class="text-on-surface-variant text-[11px] font-medium">Google 路 Speech-to-Speech</div>
|
| 322 |
</div>
|
| 323 |
+
<span id="eva-exp-score" class="text-infinite-blue font-bold text-2xl tabular-nums">0.49</span>
|
| 324 |
</div>
|
| 325 |
+
<div id="eva-exp-runners" class="space-y-2.5">
|
| 326 |
<div class="grid grid-cols-[18px_1fr_80px_35px] items-center gap-2 text-xs">
|
| 327 |
<span class="text-on-surface-variant tabular-nums font-medium">2</span>
|
| 328 |
<span class="text-on-surface font-medium truncate">GPT-Realtime</span>
|
|
|
|
| 373 |
</p>
|
| 374 |
</footer>
|
| 375 |
</div>
|
| 376 |
+
<script>
|
| 377 |
+
// Overlay synced leaderboard data on the static fallback markup.
|
| 378 |
+
// On any failure, the static markup already in the DOM remains.
|
| 379 |
+
(function () {
|
| 380 |
+
function esc(s) {
|
| 381 |
+
return String(s).replace(/[&<>"']/g, (c) => ({ '&': '&', '<': '<', '>': '>', '"': '"', "'": ''' }[c]));
|
| 382 |
+
}
|
| 383 |
+
|
| 384 |
+
function eogRunnerRow(r) {
|
| 385 |
+
return `<div class="grid grid-cols-[20px_1fr_100px_45px] items-center gap-3">
|
| 386 |
+
<span class="text-on-surface-variant text-xs tabular-nums font-medium">${r.rank}</span>
|
| 387 |
+
<span class="text-on-surface text-sm font-medium">${esc(r.model)}</span>
|
| 388 |
+
<div class="h-1.5 w-full bg-infinite-soft rounded-full overflow-hidden">
|
| 389 |
+
<div class="h-full fill-infinite rounded-full" style="width: ${r.bar}%;"></div>
|
| 390 |
+
</div>
|
| 391 |
+
<span class="text-infinite-blue text-sm font-bold text-right tabular-nums">${r.score.toFixed(1)}</span>
|
| 392 |
+
</div>`;
|
| 393 |
+
}
|
| 394 |
+
|
| 395 |
+
function evaRunnerRow(r, fill) {
|
| 396 |
+
return `<div class="grid grid-cols-[18px_1fr_80px_35px] items-center gap-2 text-xs">
|
| 397 |
+
<span class="text-on-surface-variant tabular-nums font-medium">${r.rank}</span>
|
| 398 |
+
<span class="text-on-surface font-medium truncate">${esc(r.name)}</span>
|
| 399 |
+
<div class="h-1 w-full bg-${fill}-soft rounded-full overflow-hidden">
|
| 400 |
+
<div class="h-full fill-${fill} rounded-full" style="width: ${r.bar}%;"></div>
|
| 401 |
+
</div>
|
| 402 |
+
<span class="text-infinite-blue font-bold text-right tabular-nums">${r.score.toFixed(2)}</span>
|
| 403 |
+
</div>`;
|
| 404 |
+
}
|
| 405 |
+
|
| 406 |
+
function setText(id, value) {
|
| 407 |
+
const el = document.getElementById(id);
|
| 408 |
+
if (el) el.textContent = value;
|
| 409 |
+
}
|
| 410 |
+
|
| 411 |
+
function renderEog(board) {
|
| 412 |
+
const top = board.rows[0];
|
| 413 |
+
if (!top) return;
|
| 414 |
+
setText('eog-top-name', top.model);
|
| 415 |
+
setText('eog-top-org', top.org);
|
| 416 |
+
const score = document.getElementById('eog-top-score');
|
| 417 |
+
if (score) score.innerHTML = `${top.score.toFixed(1)}<span class="text-on-surface-variant text-lg font-medium ml-0.5">%</span>`;
|
| 418 |
+
const runners = document.getElementById('eog-runners');
|
| 419 |
+
if (runners) runners.innerHTML = board.rows.slice(1).map(eogRunnerRow).join('');
|
| 420 |
+
}
|
| 421 |
+
|
| 422 |
+
function renderEvaSplit(board, prefix, fill) {
|
| 423 |
+
const top = board.rows[0];
|
| 424 |
+
if (!top) return;
|
| 425 |
+
setText(`${prefix}-name`, top.name);
|
| 426 |
+
setText(`${prefix}-sub`, top.subtitle);
|
| 427 |
+
setText(`${prefix}-score`, top.score.toFixed(2));
|
| 428 |
+
const runners = document.getElementById(`${prefix}-runners`);
|
| 429 |
+
if (runners) runners.innerHTML = board.rows.slice(1).map((r) => evaRunnerRow(r, fill)).join('');
|
| 430 |
+
}
|
| 431 |
+
|
| 432 |
+
fetch('./data/leaderboard.json', { cache: 'no-cache' })
|
| 433 |
+
.then((res) => { if (!res.ok) throw new Error('HTTP ' + res.status); return res.json(); })
|
| 434 |
+
.then((data) => {
|
| 435 |
+
if (data.eog) renderEog(data.eog);
|
| 436 |
+
if (data.evaAccuracy) renderEvaSplit(data.evaAccuracy, 'eva-acc', 'indigo');
|
| 437 |
+
if (data.evaExperience) renderEvaSplit(data.evaExperience, 'eva-exp', 'blue');
|
| 438 |
+
})
|
| 439 |
+
.catch((err) => {
|
| 440 |
+
console.warn('Leaderboard JSON load failed; showing static fallback.', err);
|
| 441 |
+
});
|
| 442 |
+
})();
|
| 443 |
+
</script>
|
| 444 |
</body>
|
| 445 |
</html>
|