Download index.html from RealPhysicalAI/B-Real_Leaderboard: direct link, hf CLI and curl.
- Browser
- Download file 9.38 kB
-
https://huggingface.co/spaces/RealPhysicalAI/B-Real_Leaderboard/resolve/main/index.html
- Command line
-
hf download hf://spaces/RealPhysicalAI/B-Real_Leaderboard/index.html
-
curl -L -o index.html https://huggingface.co/spaces/RealPhysicalAI/B-Real_Leaderboard/resolve/main/index.html
9.38 kB
| <html lang="zh-CN"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover"> | |
| <title>B-Real 具身智能榜单</title> | |
| <style> | |
| :root { | |
| color-scheme: light; | |
| --bg: #ffffff; --panel: #f7f8fa; --panel-2: #eef0f4; --border: #dfe3e9; | |
| --text: #1a1d21; --muted: #667085; --accent: #2f6feb; --accent-soft: #e8efff; | |
| --gold: #c99a1e; --silver: #8d9299; --bronze: #a9714b; --row-hover: #f2f6ff; | |
| } | |
| @media (prefers-color-scheme: dark) { | |
| :root:not([data-theme="light"]) { | |
| color-scheme: dark; | |
| --bg: #14161a; --panel: #1b1e24; --panel-2: #22262e; --border: #2e333c; | |
| --text: #e7eaee; --muted: #98a1ad; --accent: #6c9bff; --accent-soft: #1e2a44; | |
| --gold: #e0b84a; --silver: #a8aeb6; --bronze: #c88d64; --row-hover: #1f2530; | |
| } | |
| } | |
| :root[data-theme="dark"] { | |
| color-scheme: dark; | |
| --bg: #14161a; --panel: #1b1e24; --panel-2: #22262e; --border: #2e333c; | |
| --text: #e7eaee; --muted: #98a1ad; --accent: #6c9bff; --accent-soft: #1e2a44; | |
| --gold: #e0b84a; --silver: #a8aeb6; --bronze: #c88d64; --row-hover: #1f2530; | |
| } | |
| * { box-sizing: border-box; } | |
| body { | |
| margin: 0; background: var(--bg); color: var(--text); | |
| font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", | |
| "Hiragino Sans GB", "Microsoft YaHei", sans-serif; | |
| padding: 24px clamp(16px, 4vw, 40px) 48px; | |
| } | |
| .wrap { max-width: 1200px; margin: 0 auto; } | |
| h1 { font-size: clamp(20px, 2.4vw, 28px); margin: 0 0 6px; letter-spacing: -0.01em; } | |
| .sub { color: var(--muted); font-size: 13px; margin: 0 0 20px; } | |
| .sub a { color: var(--accent); text-decoration: none; } | |
| .tabs { display: flex; flex-wrap: wrap; gap: 6px; border-bottom: 1px solid var(--border); margin-bottom: 16px; } | |
| .tab { | |
| appearance: none; border: 1px solid transparent; border-bottom: none; | |
| background: transparent; color: var(--muted); font: inherit; font-weight: 600; | |
| cursor: pointer; padding: 9px 16px; border-radius: 8px 8px 0 0; margin-bottom: -1px; | |
| } | |
| .tab:hover { color: var(--text); background: var(--panel); } | |
| .tab[aria-selected="true"] { color: var(--accent); background: var(--bg); | |
| border-color: var(--border); border-bottom: 1px solid var(--bg); } | |
| .toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 12px; } | |
| .search { flex: 1 1 220px; min-width: 160px; max-width: 340px; padding: 8px 12px; | |
| border-radius: 8px; border: 1px solid var(--border); background: var(--panel); | |
| color: var(--text); font: inherit; } | |
| .search:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); } | |
| .count { color: var(--muted); font-size: 13px; margin-left: auto; } | |
| .card { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; } | |
| .scroll { overflow-x: auto; } | |
| table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; } | |
| thead th { position: sticky; top: 0; z-index: 1; background: var(--panel-2); | |
| color: var(--muted); font-size: 12px; font-weight: 600; text-align: left; | |
| padding: 10px 14px; white-space: nowrap; border-bottom: 1px solid var(--border); } | |
| thead th.num, tbody td.num { text-align: right; } | |
| tbody td { padding: 10px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; } | |
| tbody tr:last-child td { border-bottom: none; } | |
| tbody tr:hover { background: var(--row-hover); } | |
| td.model { font-weight: 600; white-space: normal; min-width: 150px; } | |
| td.rank { font-weight: 700; color: var(--muted); width: 1%; } | |
| td.rank.r1 { color: var(--gold); } | |
| td.rank.r2 { color: var(--silver); } | |
| td.rank.r3 { color: var(--bronze); } | |
| td.score { font-weight: 700; color: var(--accent); } | |
| .empty { padding: 28px 14px; text-align: center; color: var(--muted); } | |
| .note { margin-top: 16px; padding: 12px 14px; background: var(--panel); | |
| border: 1px solid var(--border); border-radius: 10px; color: var(--muted); | |
| font-size: 12.5px; white-space: pre-wrap; } | |
| footer { margin-top: 24px; color: var(--muted); font-size: 12px; } | |
| footer a { color: var(--accent); text-decoration: none; } | |
| </style> | |
| </head> | |
| <body> | |
| <div class="wrap"> | |
| <h1>B-Real 具身智能榜单</h1> | |
| <p class="sub" id="subtitle">Embodied AI Leaderboard</p> | |
| <nav class="tabs" id="tabs" role="tablist"></nav> | |
| <div class="toolbar"> | |
| <input id="search" class="search" type="search" placeholder="搜索模型或机构…" autocomplete="off"> | |
| <span class="count" id="count"></span> | |
| </div> | |
| <div class="card" id="card"></div> | |
| <div class="note" id="note" hidden></div> | |
| <footer id="footer"></footer> | |
| </div> | |
| <script> | |
| const state = { summary: null, bench: null, board: {}, filter: "" }; | |
| async function getJSON(url) { | |
| const res = await fetch(url, { cache: "no-cache" }); | |
| if (!res.ok) throw new Error(`${url} -> HTTP ${res.status}`); | |
| return res.json(); | |
| } | |
| const el = (tag, cls, text) => { | |
| const n = document.createElement(tag); | |
| if (cls) n.className = cls; | |
| if (text != null) n.textContent = text; | |
| return n; | |
| }; | |
| function rankClass(rank) { return rank === 1 ? "r1" : rank === 2 ? "r2" : rank === 3 ? "r3" : ""; } | |
| const fmt = (v) => (v == null || v === "") ? "" : (typeof v === "number" ? (Math.round(v * 100) / 100).toString() : v); | |
| const COLS = [ | |
| { key: "rank", label: "#", num: true }, | |
| { key: "name", label: "模型" }, | |
| { key: "organization", label: "机构" }, | |
| { key: "parameters", label: "参数量" }, | |
| { key: "score", label: "综合得分", num: true }, | |
| { key: "published", label: "发布日期" }, | |
| ]; | |
| function renderBoard() { | |
| const rows = state.board[state.bench.slug] || []; | |
| const q = state.filter.trim().toLowerCase(); | |
| const shown = q ? rows.filter(r => | |
| (r.name + r.organization + r.parameters).toLowerCase().includes(q)) : rows; | |
| const card = document.getElementById("card"); | |
| card.replaceChildren(); | |
| const scroll = el("div", "scroll"); | |
| const table = el("table"); | |
| const thead = el("thead"); | |
| const trh = el("tr"); | |
| for (const c of COLS) trh.append(el("th", c.num ? "num" : "", c.label)); | |
| thead.append(trh); table.append(thead); | |
| const tbody = el("tbody"); | |
| for (const r of shown) { | |
| const tr = el("tr"); | |
| for (const c of COLS) { | |
| let cls = c.num ? "num" : ""; | |
| if (c.key === "name") cls = "model"; | |
| if (c.key === "rank") cls += " rank " + rankClass(r.rank); | |
| if (c.key === "score") cls += " score"; | |
| const val = r[c.key]; | |
| tr.append(el("td", cls, (val != null && val !== "") ? fmt(val) : "—")); | |
| } | |
| tbody.append(tr); | |
| } | |
| if (!shown.length) { | |
| const tr = el("tr"), td = el("td", "empty", q ? `没有匹配 "${state.filter}" 的条目` : "暂无数据"); | |
| td.colSpan = COLS.length; tr.append(td); tbody.append(tr); | |
| } | |
| table.append(tbody); scroll.append(table); card.append(scroll); | |
| document.getElementById("count").textContent = | |
| q ? `${shown.length} / ${rows.length} 个模型` : `${rows.length} 个模型`; | |
| const note = document.getElementById("note"); | |
| const text = state.bench && state.bench.scoring_note; | |
| if (text) { note.hidden = false; note.textContent = "计分说明:\n" + text; } | |
| else { note.hidden = true; note.textContent = ""; } | |
| } | |
| function selectBench(slug) { | |
| state.bench = state.summary.benches.find(b => b.slug === slug) || state.summary.benches[0]; | |
| state.filter = ""; | |
| document.getElementById("search").value = ""; | |
| for (const b of document.querySelectorAll(".tab")) | |
| b.setAttribute("aria-selected", String(b.dataset.slug === state.bench.slug)); | |
| if (location.hash !== "#" + slug) history.replaceState(null, "", "#" + slug); | |
| renderBoard(); | |
| } | |
| async function main() { | |
| try { | |
| state.summary = await getJSON("data/summary.json"); | |
| } catch (err) { | |
| document.getElementById("card").append( | |
| el("div", "empty", `无法加载 data/summary.json:${err.message}`)); | |
| return; | |
| } | |
| const period = state.summary.period; | |
| document.getElementById("subtitle").innerHTML = period | |
| ? `Embodied AI Leaderboard · 评测周期 <b>${period}</b>` | |
| : "Embodied AI Leaderboard"; | |
| const nav = document.getElementById("tabs"); | |
| for (const b of state.summary.benches) { | |
| const btn = el("button", "tab", `${b.title} (${b.rows})`); | |
| btn.type = "button"; btn.role = "tab"; btn.dataset.slug = b.slug; | |
| btn.setAttribute("aria-selected", "false"); | |
| btn.addEventListener("click", () => selectBench(b.slug)); | |
| nav.append(btn); | |
| } | |
| await Promise.all(state.summary.benches.map(async b => { | |
| state.board[b.slug] = await getJSON(`data/${b.slug}/leaderboard.json`).catch(() => []); | |
| })); | |
| document.getElementById("search").addEventListener("input", (e) => { | |
| state.filter = e.target.value; renderBoard(); | |
| }); | |
| window.addEventListener("hashchange", () => { | |
| const slug = location.hash.slice(1); | |
| if (state.summary.benches.some(b => b.slug === slug)) selectBench(slug); | |
| }); | |
| const slug = location.hash.slice(1); | |
| selectBench(state.summary.benches.some(b => b.slug === slug) | |
| ? slug : state.summary.benches[0].slug); | |
| document.getElementById("footer").innerHTML = "数据来源:" + | |
| state.summary.benches.map(b => | |
| `<a href="${b.source}" target="_blank" rel="noopener">${b.title}</a>` | |
| ).join(" · "); | |
| } | |
| main(); | |
| </script> | |
| </body> | |
| </html> | |