Spaces:
Running
Running
Upload index.html with huggingface_hub
Browse files- index.html +4 -1
index.html
CHANGED
|
@@ -132,7 +132,10 @@ input.oninput = () => { input.style.height = "auto"; input.style.height = Math.m
|
|
| 132 |
try {
|
| 133 |
if (!navigator.gpu) throw new Error("This browser has no WebGPU — open in Chrome, Edge, or a recent mobile browser.");
|
| 134 |
st.textContent = `loading ${m.name} (${m.size})…`;
|
| 135 |
-
|
|
|
|
|
|
|
|
|
|
| 136 |
if (!loaded || !loaded.gpu) throw new Error("model load failed");
|
| 137 |
engine = await createEngine(m, loaded);
|
| 138 |
armed = true;
|
|
|
|
| 132 |
try {
|
| 133 |
if (!navigator.gpu) throw new Error("This browser has no WebGPU — open in Chrome, Edge, or a recent mobile browser.");
|
| 134 |
st.textContent = `loading ${m.name} (${m.size})…`;
|
| 135 |
+
// The load animation IS the proof: each weight block re-derived on YOUR GPU (Law L5), a live honest GB/s.
|
| 136 |
+
// Takes over the status only once blocks start verifying; before that, the loader's own messages show.
|
| 137 |
+
(function vTick(){ if (armed) return; const v = globalThis.__vs; if (v && v.n) { const gb = v.bytes/1073741824, gbps = v.ms > 0 ? gb/(v.ms/1000) : 0; st.textContent = `🛡 verifying on your GPU · ${v.n} blocks · ${gb.toFixed(2)} GB${gbps ? " · " + gbps.toFixed(1) + " GB/s" : ""}`; } requestAnimationFrame(vTick); })();
|
| 138 |
+
const loaded = await loadModel(m, { onStatus: (s) => { if (s && !(globalThis.__vs && globalThis.__vs.n)) st.textContent = `${m.name}: ${s}`; }, onProgress: (d, t, w) => { if (!(globalThis.__vs && globalThis.__vs.n)) st.textContent = `${m.name}: ${w} ${t ? Math.round(100 * d / t) : 0}%`; } });
|
| 139 |
if (!loaded || !loaded.gpu) throw new Error("model load failed");
|
| 140 |
engine = await createEngine(m, loaded);
|
| 141 |
armed = true;
|