Aayush Kothari commited on
Commit ·
b7be313
1
Parent(s): 3530fff
Fix encoder status badge
Browse files- index.html +3 -2
index.html
CHANGED
|
@@ -1013,8 +1013,9 @@ function paintStatus() {
|
|
| 1013 |
d.className = 'dot ' + (S.rdkit ? 'is-ok' : (S.rdkitErr ? 'is-bad' : 'is-wait'));
|
| 1014 |
l.textContent = S.rdkit ? `RDKit ${S.rdkit.version ? S.rdkit.version() : 'ready'}` : (S.rdkitErr ? 'RDKit failed' : 'RDKit loading');
|
| 1015 |
const hd = $('#dot-hf'), hl = $('#lbl-hf');
|
| 1016 |
-
|
| 1017 |
-
|
|
|
|
| 1018 |
}
|
| 1019 |
|
| 1020 |
/** Run fn with a live RDKit mol, always freeing the WASM handle. */
|
|
|
|
| 1013 |
d.className = 'dot ' + (S.rdkit ? 'is-ok' : (S.rdkitErr ? 'is-bad' : 'is-wait'));
|
| 1014 |
l.textContent = S.rdkit ? `RDKit ${S.rdkit.version ? S.rdkit.version() : 'ready'}` : (S.rdkitErr ? 'RDKit failed' : 'RDKit loading');
|
| 1015 |
const hd = $('#dot-hf'), hl = $('#lbl-hf');
|
| 1016 |
+
const encOK = S.hfToken || (S.backend.ok && S.hfBase.indexOf(S.backend.base) === 0);
|
| 1017 |
+
hd.className = 'dot ' + (encOK ? 'is-ok' : '');
|
| 1018 |
+
hl.textContent = encOK ? 'Encoders ready' : 'Encoders offline';
|
| 1019 |
}
|
| 1020 |
|
| 1021 |
/** Run fn with a live RDKit mol, always freeing the WASM handle. */
|