YurkoWasHere commited on
Commit
01abd36
·
verified ·
1 Parent(s): d8ebef3

Readable labels in the manifest file dropdown

Browse files
Files changed (1) hide show
  1. index.html +6 -2
index.html CHANGED
@@ -75,7 +75,7 @@
75
  .stage { position: relative; flex: 1; min-height: 0; }
76
  eqty-explorer { display: block; height: 100%; }
77
  #legacy { display: block; width: 100%; height: 100%; border: 0; }
78
- .bar select { height: 34px; max-width: 40%; border: 1px solid var(--line); background: var(--bg); color: var(--fg); border-radius: 6px; padding: 0 8px; font-family: var(--mono); font-size: 13px; cursor: pointer; }
79
  .bar .kind { font-size: 12px; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 2px 8px; white-space: nowrap; }
80
  .overlay { position: absolute; inset: 0; display: grid; place-items: center; background: var(--bg); z-index: 50; padding: 16px; }
81
  .overlay .box { max-width: 520px; text-align: center; line-height: 1.5; }
@@ -157,6 +157,10 @@
157
  const HF = "https://huggingface.co";
158
 
159
  const $ = (id) => document.getElementById(id);
 
 
 
 
160
  const esc = (s) => String(s).replace(/[&<>"']/g, (c) => ({ "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" }[c]));
161
 
162
  // ---- token (optional, per-tab) ----
@@ -286,7 +290,7 @@
286
  if (files.length) {
287
  const pick = files.includes(file) ? file : files.includes(EQTY_DEFAULT) ? EQTY_DEFAULT : files[0];
288
  const sel = $("vfile");
289
- sel.innerHTML = files.map((f) => `<option value="${esc(f)}">${esc(f.slice(EQTY_DIR.length + 1))}</option>`).join("");
290
  sel.value = pick;
291
  sel.classList.remove("hidden");
292
  sel.onchange = () => {
 
75
  .stage { position: relative; flex: 1; min-height: 0; }
76
  eqty-explorer { display: block; height: 100%; }
77
  #legacy { display: block; width: 100%; height: 100%; border: 0; }
78
+ .bar select { height: 34px; max-width: 40%; border: 1px solid var(--line); background: var(--bg); color: var(--fg); border-radius: 6px; padding: 0 8px; font-family: var(--font); font-size: 14px; font-weight: 500; cursor: pointer; }
79
  .bar .kind { font-size: 12px; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 2px 8px; white-space: nowrap; }
80
  .overlay { position: absolute; inset: 0; display: grid; place-items: center; background: var(--bg); z-index: 50; padding: 16px; }
81
  .overlay .box { max-width: 520px; text-align: center; line-height: 1.5; }
 
157
  const HF = "https://huggingface.co";
158
 
159
  const $ = (id) => document.getElementById(id);
160
+ // .eqtylab/sub/base-model-benchmarks.json -> "Sub / Base Model Benchmarks"
161
+ const fileLabel = (path) => path.slice(EQTY_DIR.length + 1).replace(/\.json$/i, "").split("/")
162
+ .map((part) => part.replace(/[-_]+/g, " ").trim().replace(/(^|\s)(\S)/g, (m, sp, c) => sp + c.toUpperCase()))
163
+ .join(" / ");
164
  const esc = (s) => String(s).replace(/[&<>"']/g, (c) => ({ "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" }[c]));
165
 
166
  // ---- token (optional, per-tab) ----
 
290
  if (files.length) {
291
  const pick = files.includes(file) ? file : files.includes(EQTY_DEFAULT) ? EQTY_DEFAULT : files[0];
292
  const sel = $("vfile");
293
+ sel.innerHTML = files.map((f) => `<option value="${esc(f)}" title="${esc(f)}">${esc(fileLabel(f))}</option>`).join("");
294
  sel.value = pick;
295
  sel.classList.remove("hidden");
296
  sel.onchange = () => {