|
@@ -3,6 +3,7 @@
|
|
|
<head>
|
|
<head>
|
|
|
<meta charset="utf-8">
|
|
<meta charset="utf-8">
|
|
|
<title>sm121 — tested recipes</title>
|
|
<title>sm121 — tested recipes</title>
|
|
|
|
|
+<link rel="icon" href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Crect width='32' height='32' rx='7' fill='%235ee0a0'/%3E%3Cpath d='M16 5.5l2.7 7.8 7.8 2.7-7.8 2.7L16 26.5l-2.7-7.8L5.5 16l7.8-2.7z' fill='%23141a21'/%3E%3C/svg%3E">
|
|
|
<style>
|
|
<style>
|
|
|
:root { color-scheme: light dark; }
|
|
:root { color-scheme: light dark; }
|
|
|
body { font: 13px/1.45 system-ui, sans-serif; margin: 16px; }
|
|
body { font: 13px/1.45 system-ui, sans-serif; margin: 16px; }
|
|
@@ -27,13 +28,19 @@
|
|
|
.prov { font-family: ui-monospace, monospace; font-size: 10px; opacity: .8; white-space: nowrap; }
|
|
.prov { font-family: ui-monospace, monospace; font-size: 10px; opacity: .8; white-space: nowrap; }
|
|
|
a.open:hover { background: color-mix(in srgb, currentColor 12%, canvas); }
|
|
a.open:hover { background: color-mix(in srgb, currentColor 12%, canvas); }
|
|
|
tr.row { cursor: pointer; }
|
|
tr.row { cursor: pointer; }
|
|
|
- td.recipe { position: relative; }
|
|
|
|
|
- td.recipe .copy { position: absolute; right: 3px; top: 50%; transform: translateY(-50%);
|
|
|
|
|
|
|
+ /* hover-revealed cell buttons sit at the right edge, so both cells
|
|
|
|
|
+ reserve room for them instead of letting the text slide under */
|
|
|
|
|
+ td.recipe, td.model { position: relative; }
|
|
|
|
|
+ td.recipe { padding-right: 26px; }
|
|
|
|
|
+ td.model { padding-right: 64px; }
|
|
|
|
|
+ td.recipe .copy, td.model .copy, td.model .hf { position: absolute; top: 50%; transform: translateY(-50%);
|
|
|
visibility: hidden; cursor: pointer; padding: 0 4px; border-radius: 3px; border: 1px solid color-mix(in srgb, currentColor 30%, transparent);
|
|
visibility: hidden; cursor: pointer; padding: 0 4px; border-radius: 3px; border: 1px solid color-mix(in srgb, currentColor 30%, transparent);
|
|
|
- background: canvas; color: inherit; font: inherit; line-height: 1.3; }
|
|
|
|
|
- td.recipe:hover .copy { visibility: visible; }
|
|
|
|
|
- td.recipe .copy:hover { background: color-mix(in srgb, currentColor 12%, canvas); }
|
|
|
|
|
- td.recipe .copied { color: green; font-weight: 600; }
|
|
|
|
|
|
|
+ background: canvas; color: inherit; font: inherit; line-height: 1.3; text-decoration: none; }
|
|
|
|
|
+ td.recipe .copy, td.model .copy { right: 3px; }
|
|
|
|
|
+ td.model .hf { right: 32px; font-size: 10px; font-weight: 600; letter-spacing: .3px; }
|
|
|
|
|
+ td.recipe:hover .copy, td.model:hover .copy, td.model:hover .hf { visibility: visible; }
|
|
|
|
|
+ td.recipe .copy:hover, td.model .copy:hover, td.model .hf:hover { background: color-mix(in srgb, currentColor 12%, canvas); }
|
|
|
|
|
+ td.recipe .copied, td.model .copied { color: green; font-weight: 600; }
|
|
|
td.recipe .medals { letter-spacing: 1px; }
|
|
td.recipe .medals { letter-spacing: 1px; }
|
|
|
.half { -webkit-background-clip: text; background-clip: text; color: transparent; }
|
|
.half { -webkit-background-clip: text; background-clip: text; color: transparent; }
|
|
|
td.num { text-align: right; white-space: nowrap; }
|
|
td.num { text-align: right; white-space: nowrap; }
|
|
@@ -496,7 +503,8 @@ function render() {
|
|
|
const lr = r.reports.length ? r.reports[r.reports.length - 1] : null;
|
|
const lr = r.reports.length ? r.reports[r.reports.length - 1] : null;
|
|
|
const tip = c[0] === "last" && lr
|
|
const tip = c[0] === "last" && lr
|
|
|
? ` title="${esc(lr.date + (lr.time ? " " + lr.time : ""))}"` : "";
|
|
? ` title="${esc(lr.date + (lr.time ? " " + lr.time : ""))}"` : "";
|
|
|
- const cls = (NUM.has(c[0]) ? "num" : "") + (c[0] === "name" ? " recipe" : "");
|
|
|
|
|
|
|
+ const cls = (NUM.has(c[0]) ? "num" : "") + (c[0] === "name" ? " recipe" : "") +
|
|
|
|
|
+ (c[0] === "model" ? " model" : "");
|
|
|
let body;
|
|
let body;
|
|
|
if (c[0] === "stars") {
|
|
if (c[0] === "stars") {
|
|
|
const si = starInfo(r);
|
|
const si = starInfo(r);
|
|
@@ -524,6 +532,17 @@ function render() {
|
|
|
} else if (c[0] === "name") {
|
|
} else if (c[0] === "name") {
|
|
|
body = medalBadge(r) + esc(v) +
|
|
body = medalBadge(r) + esc(v) +
|
|
|
`<button class="copy" data-copy="${esc(r.name)}" title="copy recipe name">⧉</button>`;
|
|
`<button class="copy" data-copy="${esc(r.name)}" title="copy recipe name">⧉</button>`;
|
|
|
|
|
+ } else if (c[0] === "model") {
|
|
|
|
|
+ // model id: copy it, and jump to the checkpoint's page on the Hub
|
|
|
|
|
+ // (a bare org/name is a Hub repo id; local paths are not linked)
|
|
|
|
|
+ const m = String(v);
|
|
|
|
|
+ const repo = /^[\w.-]+\/[\w.-]+$/.test(m);
|
|
|
|
|
+ body = esc(m) +
|
|
|
|
|
+ `<button class="copy" data-copy="${esc(m)}" title="copy model id">⧉</button>` +
|
|
|
|
|
+ (repo
|
|
|
|
|
+ ? `<a class="hf" href="https://huggingface.co/${encodeURI(m)}" target="_blank" rel="noopener"` +
|
|
|
|
|
+ ` title="open ${esc(m)} on Hugging Face">HF</a>`
|
|
|
|
|
+ : "");
|
|
|
} else {
|
|
} else {
|
|
|
body = esc(v);
|
|
body = esc(v);
|
|
|
}
|
|
}
|
|
@@ -579,6 +598,7 @@ function copyName(btn) {
|
|
|
document.querySelector("tbody").addEventListener("click", e => {
|
|
document.querySelector("tbody").addEventListener("click", e => {
|
|
|
const cp = e.target.closest("button.copy");
|
|
const cp = e.target.closest("button.copy");
|
|
|
if (cp) { copyName(cp); return; } // no row toggle under the copy button
|
|
if (cp) { copyName(cp); return; } // no row toggle under the copy button
|
|
|
|
|
+ if (e.target.closest("a.hf")) return; // open the Hub page, don't toggle the row
|
|
|
const g = e.target.closest("tr.g1,tr.g2");
|
|
const g = e.target.closest("tr.g1,tr.g2");
|
|
|
if (g) { const k = decodeURIComponent(g.dataset.g); S.closed.has(k) ? S.closed.delete(k) : S.closed.add(k); render(); return; }
|
|
if (g) { const k = decodeURIComponent(g.dataset.g); S.closed.has(k) ? S.closed.delete(k) : S.closed.add(k); render(); return; }
|
|
|
const row = e.target.closest("tr.row");
|
|
const row = e.target.closest("tr.row");
|