Spaces:
Running
Running
Update index.html
Browse files- index.html +13 -6
index.html
CHANGED
|
@@ -1693,7 +1693,7 @@ kbd {
|
|
| 1693 |
<li>The Centre for Genomics, Zewail City</li>
|
| 1694 |
</ul>
|
| 1695 |
<div class="section-h3">Contact</div>
|
| 1696 |
-
<p class="prose">For questions, collaboration inquiries, or feedback: <a href="
|
| 1697 |
</div>
|
| 1698 |
</div>
|
| 1699 |
</div>
|
|
@@ -1784,6 +1784,8 @@ kbd {
|
|
| 1784 |
const GRADIO_PREDICTION_TARGET_ID = "nonzeroexit/AMP-Classifier";
|
| 1785 |
const IS_EMAIL_SENDING_ENABLED = true;
|
| 1786 |
const MAILER_SPACE_ID = "nonzeroexit/AMP-Mailer";
|
|
|
|
|
|
|
| 1787 |
/* ββ AA PROPERTY MAP βββββββββββββββββββββββββββββββββββββββ */
|
| 1788 |
const AA_PROPS = {
|
| 1789 |
A:'hydrophobic', V:'hydrophobic', I:'hydrophobic', L:'hydrophobic',
|
|
@@ -2054,6 +2056,9 @@ kbd {
|
|
| 2054 |
updateMicCheckboxes();
|
| 2055 |
updateBtnState();
|
| 2056 |
updateSeqStats(sequenceInput.value.toUpperCase());
|
|
|
|
|
|
|
|
|
|
| 2057 |
}
|
| 2058 |
function handlePaste(e) {
|
| 2059 |
e.preventDefault();
|
|
@@ -2447,7 +2452,9 @@ kbd {
|
|
| 2447 |
emailStatusResult.innerHTML = '<i class="fas fa-spinner fa-spin"></i> Sending report to ' + toEmail + 'β¦';
|
| 2448 |
|
| 2449 |
try {
|
| 2450 |
-
const mailer = await Client.connect(MAILER_SPACE_ID
|
|
|
|
|
|
|
| 2451 |
const result = await mailer.predict("/send", [
|
| 2452 |
toEmail, pdfB64, ampLabel,
|
| 2453 |
(ampConf * 100).toFixed(1) + '%', seqPrev
|
|
@@ -3046,10 +3053,10 @@ kbd {
|
|
| 3046 |
}
|
| 3047 |
},
|
| 3048 |
columnStyles: {
|
| 3049 |
-
0: { cellWidth:
|
| 3050 |
-
1: { cellWidth:
|
| 3051 |
-
2: { cellWidth:
|
| 3052 |
-
3: { cellWidth:
|
| 3053 |
},
|
| 3054 |
margin: { left: 15, right: 15 }
|
| 3055 |
});
|
|
|
|
| 1693 |
<li>The Centre for Genomics, Zewail City</li>
|
| 1694 |
</ul>
|
| 1695 |
<div class="section-h3">Contact</div>
|
| 1696 |
+
<p class="prose">For questions, collaboration inquiries, or feedback: <a href="/cdn-cgi/l/email-protection#c8adb8a1aba9a5b8e6bbbdb888afa5a9a1a4e6aba7a5" style="color:var(--ncbi-blue);"><span class="__cf_email__" data-cfemail="4f2a3f262c2e223f613c3a3f0f28222e2623612c2022">[email protected]</span></a></p>
|
| 1697 |
</div>
|
| 1698 |
</div>
|
| 1699 |
</div>
|
|
|
|
| 1784 |
const GRADIO_PREDICTION_TARGET_ID = "nonzeroexit/AMP-Classifier";
|
| 1785 |
const IS_EMAIL_SENDING_ENABLED = true;
|
| 1786 |
const MAILER_SPACE_ID = "nonzeroexit/AMP-Mailer";
|
| 1787 |
+
const HF_TOKEN = null; // β if Space is Private: paste your HF read token "hf_xxxx"
|
| 1788 |
+
// β if Space is Public: leave as null
|
| 1789 |
/* ββ AA PROPERTY MAP βββββββββββββββββββββββββββββββββββββββ */
|
| 1790 |
const AA_PROPS = {
|
| 1791 |
A:'hydrophobic', V:'hydrophobic', I:'hydrophobic', L:'hydrophobic',
|
|
|
|
| 2056 |
updateMicCheckboxes();
|
| 2057 |
updateBtnState();
|
| 2058 |
updateSeqStats(sequenceInput.value.toUpperCase());
|
| 2059 |
+
// Auto-clear results dashboard whenever the sequence is changed
|
| 2060 |
+
resetDashboard();
|
| 2061 |
+
setStep(1, 'active', 'Enter a valid sequence to begin.');
|
| 2062 |
}
|
| 2063 |
function handlePaste(e) {
|
| 2064 |
e.preventDefault();
|
|
|
|
| 2452 |
emailStatusResult.innerHTML = '<i class="fas fa-spinner fa-spin"></i> Sending report to ' + toEmail + 'β¦';
|
| 2453 |
|
| 2454 |
try {
|
| 2455 |
+
const mailer = await Client.connect(MAILER_SPACE_ID, {
|
| 2456 |
+
hf_token: HF_TOKEN // set to null if Space is public
|
| 2457 |
+
});
|
| 2458 |
const result = await mailer.predict("/send", [
|
| 2459 |
toEmail, pdfB64, ampLabel,
|
| 2460 |
(ampConf * 100).toFixed(1) + '%', seqPrev
|
|
|
|
| 3053 |
}
|
| 3054 |
},
|
| 3055 |
columnStyles: {
|
| 3056 |
+
0: { cellWidth: 8, fillColor: [237,242,252] },
|
| 3057 |
+
1: { cellWidth: 88, fillColor: [237,242,252] },
|
| 3058 |
+
2: { cellWidth: 26, halign:'center' },
|
| 3059 |
+
3: { cellWidth: 22, halign:'right' }
|
| 3060 |
},
|
| 3061 |
margin: { left: 15, right: 15 }
|
| 3062 |
});
|