Upload folder using huggingface_hub
Browse files- .gitattributes +1 -0
- static/assets/Fastino-Dark.png +0 -0
- static/assets/Fastino-Light.png +0 -0
- static/assets/fox-laptop.png +3 -0
- static/brand.css +15 -65
- static/index.html +2 -21
- static/strip.js +5 -2
.gitattributes
CHANGED
|
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
static/assets/fox-laptop.png filter=lfs diff=lfs merge=lfs -text
|
static/assets/Fastino-Dark.png
ADDED
|
static/assets/Fastino-Light.png
ADDED
|
static/assets/fox-laptop.png
ADDED
|
Git LFS Details
|
static/brand.css
CHANGED
|
@@ -57,43 +57,6 @@ body {
|
|
| 57 |
.site-intro h1 em { font-style: normal; color: var(--orange-deep); }
|
| 58 |
.site-intro .sub { margin-top: 6px; color: var(--ink-soft); font-size: 15px; max-width: 56ch; }
|
| 59 |
|
| 60 |
-
/* ---- model strip ---- */
|
| 61 |
-
.model-strip {
|
| 62 |
-
display: flex; align-items: center; gap: 14px;
|
| 63 |
-
margin: 18px 0 20px; padding: 12px 16px;
|
| 64 |
-
background: transparent; border: 0; border-bottom: 1px solid var(--ash); border-radius: 0;
|
| 65 |
-
}
|
| 66 |
-
.model-copy { flex: 1; min-width: 0; }
|
| 67 |
-
.model-name-row { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
|
| 68 |
-
.model-name-row a { color: var(--ink); font-weight: 600; text-decoration: none; font-size: 15px; border-bottom: 1px solid transparent; }
|
| 69 |
-
.model-name-row a:hover { border-bottom-color: var(--orange-deep); color: var(--orange-deep); }
|
| 70 |
-
.model-variant { font-size: 12px; color: var(--ink-faint); font-family: var(--font-mono); }
|
| 71 |
-
|
| 72 |
-
.status-pill {
|
| 73 |
-
display: inline-flex; align-items: center; gap: 7px;
|
| 74 |
-
font-family: var(--font-mono); font-size: 11px; font-weight: 500;
|
| 75 |
-
color: var(--ink-soft); white-space: nowrap;
|
| 76 |
-
padding: 3px 9px; border: 1px solid var(--ash); border-radius: 4px;
|
| 77 |
-
background: var(--greige);
|
| 78 |
-
}
|
| 79 |
-
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--warm-gray); flex-shrink: 0; }
|
| 80 |
-
.status-pill.is-ready { border-color: var(--ok-bg); color: var(--ok); }
|
| 81 |
-
.status-pill.is-ready .status-dot { background: var(--ok); }
|
| 82 |
-
.status-pill.is-error { border-color: rgba(168,69,69,0.3); color: var(--neg); }
|
| 83 |
-
.status-pill.is-error .status-dot { background: var(--neg); }
|
| 84 |
-
.status-pill.is-loading .status-dot { background: var(--orange); animation: pulse-dot 1.1s ease-in-out infinite; }
|
| 85 |
-
@keyframes pulse-dot { 0%, 100% { opacity: 0.35; } 50% { opacity: 1; } }
|
| 86 |
-
|
| 87 |
-
.load-block { min-width: 180px; }
|
| 88 |
-
.load-track { height: 3px; background: transparent; border-radius: 99px; overflow: hidden; position: relative; }
|
| 89 |
-
.load-track::before { content: ""; position: absolute; inset: 0; background: var(--ash); border-radius: 99px; opacity: 0; transition: opacity 200ms; }
|
| 90 |
-
.model-strip.is-loading .load-track::before, .model-strip.is-preparing .load-track::before { opacity: 1; }
|
| 91 |
-
#load-progress { display: block; height: 100%; width: 0; background: var(--orange); border-radius: 99px; transition: width 400ms var(--ease-out); position: relative; }
|
| 92 |
-
.model-strip.is-ready #load-progress { width: 0; opacity: 0; }
|
| 93 |
-
.model-strip.is-ready #load-percent { display: none; }
|
| 94 |
-
|
| 95 |
-
/* hide percent counter entirely; status pill communicates state */
|
| 96 |
-
|
| 97 |
/* ---- workspace ---- */
|
| 98 |
.workspace { display: grid; grid-template-columns: 5fr 7fr; gap: 16px; align-items: stretch; }
|
| 99 |
.workspace.single { grid-template-columns: 1fr; }
|
|
@@ -116,37 +79,25 @@ textarea, .editor {
|
|
| 116 |
textarea:focus, .editor:focus { outline: 2px solid var(--ash); outline-offset: -2px; }
|
| 117 |
textarea:focus-visible { outline: 2px solid var(--orange-deep); }
|
| 118 |
|
| 119 |
-
/* ---- example selector:
|
| 120 |
-
.examples-panel { margin:
|
| 121 |
.examples-label {
|
| 122 |
font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
|
| 123 |
-
color: var(--ink-faint); display: block; margin-bottom:
|
| 124 |
-
}
|
| 125 |
-
.example-list {
|
| 126 |
-
display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
|
| 127 |
-
border-top: 1px solid var(--ash); border-bottom: 1px solid var(--ash);
|
| 128 |
}
|
|
|
|
| 129 |
.ex {
|
| 130 |
-
font: inherit;
|
| 131 |
-
|
| 132 |
-
padding:
|
| 133 |
-
|
| 134 |
-
|
| 135 |
-
|
| 136 |
-
}
|
| 137 |
-
.ex:
|
| 138 |
-
.ex
|
| 139 |
-
|
| 140 |
-
|
| 141 |
-
.ex .ex-idx { font-family: var(--font-mono); font-size: 11px; color: var(--ink-faint); }
|
| 142 |
-
.ex .ex-name { font-size: 13px; font-weight: 500; color: var(--ink); }
|
| 143 |
-
.ex.active { background: var(--greige); }
|
| 144 |
-
.ex.active .ex-idx { color: var(--orange-deep); }
|
| 145 |
-
.ex.active::after {
|
| 146 |
-
content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 2px;
|
| 147 |
-
background: var(--orange-deep);
|
| 148 |
-
}
|
| 149 |
-
@media (max-width: 860px) { .example-list { grid-template-columns: 1fr 1fr; } }
|
| 150 |
|
| 151 |
/* ---- output body ---- */
|
| 152 |
.output-body {
|
|
@@ -246,7 +197,6 @@ textarea:focus-visible { outline: 2px solid var(--orange-deep); }
|
|
| 246 |
|
| 247 |
@media (max-width: 860px) {
|
| 248 |
.workspace { grid-template-columns: 1fr; }
|
| 249 |
-
.load-block { display: none; }
|
| 250 |
.inspector-groups { grid-template-columns: 1fr; }
|
| 251 |
}
|
| 252 |
|
|
|
|
| 57 |
.site-intro h1 em { font-style: normal; color: var(--orange-deep); }
|
| 58 |
.site-intro .sub { margin-top: 6px; color: var(--ink-soft); font-size: 15px; max-width: 56ch; }
|
| 59 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 60 |
/* ---- workspace ---- */
|
| 61 |
.workspace { display: grid; grid-template-columns: 5fr 7fr; gap: 16px; align-items: stretch; }
|
| 62 |
.workspace.single { grid-template-columns: 1fr; }
|
|
|
|
| 79 |
textarea:focus, .editor:focus { outline: 2px solid var(--ash); outline-offset: -2px; }
|
| 80 |
textarea:focus-visible { outline: 2px solid var(--orange-deep); }
|
| 81 |
|
| 82 |
+
/* ---- example selector: pill chips ---- */
|
| 83 |
+
.examples-panel { margin: 18px 0 14px; }
|
| 84 |
.examples-label {
|
| 85 |
font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
|
| 86 |
+
color: var(--ink-faint); display: block; margin-bottom: 8px;
|
|
|
|
|
|
|
|
|
|
|
|
|
| 87 |
}
|
| 88 |
+
.example-list { display: flex; flex-wrap: wrap; gap: 8px; }
|
| 89 |
.ex {
|
| 90 |
+
font: inherit; font-size: 13px; font-weight: 500; color: var(--ink);
|
| 91 |
+
background: var(--card); border: 1px solid var(--ash); border-radius: 99px;
|
| 92 |
+
padding: 6px 14px; cursor: pointer;
|
| 93 |
+
transition: background 140ms var(--ease-out), border-color 140ms var(--ease-out), transform 80ms var(--ease-out);
|
| 94 |
+
}
|
| 95 |
+
.ex:hover { background: var(--greige); border-color: var(--warm-gray); }
|
| 96 |
+
.ex:active { transform: scale(0.97); }
|
| 97 |
+
.ex:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
|
| 98 |
+
.ex.active {
|
| 99 |
+
background: var(--ink); color: var(--paper); border-color: var(--ink);
|
| 100 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 101 |
|
| 102 |
/* ---- output body ---- */
|
| 103 |
.output-body {
|
|
|
|
| 197 |
|
| 198 |
@media (max-width: 860px) {
|
| 199 |
.workspace { grid-template-columns: 1fr; }
|
|
|
|
| 200 |
.inspector-groups { grid-template-columns: 1fr; }
|
| 201 |
}
|
| 202 |
|
static/index.html
CHANGED
|
@@ -17,22 +17,6 @@
|
|
| 17 |
<p class="sub" id="subtitle"></p>
|
| 18 |
</header>
|
| 19 |
|
| 20 |
-
<section class="model-strip is-loading" id="model-strip" aria-label="Model status">
|
| 21 |
-
<div class="model-copy">
|
| 22 |
-
<div class="model-name-row">
|
| 23 |
-
<a id="model-link" href="#" target="_blank" rel="noopener"></a>
|
| 24 |
-
<span class="model-variant" id="model-variant"></span>
|
| 25 |
-
</div>
|
| 26 |
-
</div>
|
| 27 |
-
<span class="status-pill is-loading" id="status-pill">
|
| 28 |
-
<span class="status-dot" aria-hidden="true"></span>
|
| 29 |
-
<span id="status" role="status" aria-live="polite">Connecting</span>
|
| 30 |
-
</span>
|
| 31 |
-
<div class="load-block">
|
| 32 |
-
<div class="load-track" aria-hidden="true"><span id="load-progress"></span></div>
|
| 33 |
-
</div>
|
| 34 |
-
</section>
|
| 35 |
-
|
| 36 |
<main>
|
| 37 |
<section class="examples-panel" aria-label="Examples">
|
| 38 |
<span class="examples-label">Examples</span>
|
|
@@ -204,15 +188,12 @@ $("output").addEventListener("click", (e) => {
|
|
| 204 |
document.title = `${cfg.title.replace(/<[^>]+>/g, "")} - GLiNER 2.5`;
|
| 205 |
$("title").innerHTML = cfg.title;
|
| 206 |
$("subtitle").innerHTML = cfg.subtitle;
|
| 207 |
-
$("model-link").textContent = cfg.model_name;
|
| 208 |
-
$("model-link").href = cfg.model_url || "#";
|
| 209 |
-
$("model-variant").textContent = cfg.model_variant || "";
|
| 210 |
$("code-panel").textContent = cfg.code || "";
|
| 211 |
|
| 212 |
cfg.examples.forEach((ex, i) => {
|
| 213 |
const b = document.createElement("button");
|
| 214 |
b.type = "button"; b.className = "ex" + (i === 0 ? " active" : "");
|
| 215 |
-
b.
|
| 216 |
b.addEventListener("click", () => {
|
| 217 |
document.querySelectorAll(".ex").forEach((x) => x.classList.toggle("active", x === b));
|
| 218 |
$("input").value = ex.text;
|
|
@@ -224,8 +205,8 @@ $("output").addEventListener("click", (e) => {
|
|
| 224 |
setEmpty("idle");
|
| 225 |
if (cfg.examples[0]) $("input").value = cfg.examples[0].text;
|
| 226 |
READY = await waitForServer();
|
| 227 |
-
stripSet(READY ? "Model ready" : "Model unavailable", READY ? "ready" : "error", READY ? 100 : 0);
|
| 228 |
if (READY) infer();
|
|
|
|
| 229 |
})();
|
| 230 |
</script>
|
| 231 |
</body>
|
|
|
|
| 17 |
<p class="sub" id="subtitle"></p>
|
| 18 |
</header>
|
| 19 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
<main>
|
| 21 |
<section class="examples-panel" aria-label="Examples">
|
| 22 |
<span class="examples-label">Examples</span>
|
|
|
|
| 188 |
document.title = `${cfg.title.replace(/<[^>]+>/g, "")} - GLiNER 2.5`;
|
| 189 |
$("title").innerHTML = cfg.title;
|
| 190 |
$("subtitle").innerHTML = cfg.subtitle;
|
|
|
|
|
|
|
|
|
|
| 191 |
$("code-panel").textContent = cfg.code || "";
|
| 192 |
|
| 193 |
cfg.examples.forEach((ex, i) => {
|
| 194 |
const b = document.createElement("button");
|
| 195 |
b.type = "button"; b.className = "ex" + (i === 0 ? " active" : "");
|
| 196 |
+
b.textContent = ex.chip;
|
| 197 |
b.addEventListener("click", () => {
|
| 198 |
document.querySelectorAll(".ex").forEach((x) => x.classList.toggle("active", x === b));
|
| 199 |
$("input").value = ex.text;
|
|
|
|
| 205 |
setEmpty("idle");
|
| 206 |
if (cfg.examples[0]) $("input").value = cfg.examples[0].text;
|
| 207 |
READY = await waitForServer();
|
|
|
|
| 208 |
if (READY) infer();
|
| 209 |
+
else setEmpty("error");
|
| 210 |
})();
|
| 211 |
</script>
|
| 212 |
</body>
|
static/strip.js
CHANGED
|
@@ -23,11 +23,14 @@
|
|
| 23 |
function stripSet(message, tone, pct) {
|
| 24 |
const strip = document.getElementById("model-strip");
|
| 25 |
const pill = document.getElementById("status-pill");
|
| 26 |
-
document.getElementById("status")
|
|
|
|
|
|
|
| 27 |
strip.className = `model-strip is-${tone}`;
|
| 28 |
if (pill) pill.className = `status-pill is-${tone}`;
|
| 29 |
if (pct != null) {
|
| 30 |
-
document.getElementById("load-progress")
|
|
|
|
| 31 |
}
|
| 32 |
}
|
| 33 |
|
|
|
|
| 23 |
function stripSet(message, tone, pct) {
|
| 24 |
const strip = document.getElementById("model-strip");
|
| 25 |
const pill = document.getElementById("status-pill");
|
| 26 |
+
const status = document.getElementById("status");
|
| 27 |
+
if (!strip || !status) return; // demo page removed the strip; nothing to update
|
| 28 |
+
status.textContent = message;
|
| 29 |
strip.className = `model-strip is-${tone}`;
|
| 30 |
if (pill) pill.className = `status-pill is-${tone}`;
|
| 31 |
if (pct != null) {
|
| 32 |
+
const bar = document.getElementById("load-progress");
|
| 33 |
+
if (bar) bar.style.width = `${pct}%`;
|
| 34 |
}
|
| 35 |
}
|
| 36 |
|