Spaces:
Running
Running
Upload index.html
Browse files- index.html +10 -0
index.html
CHANGED
@@ -11,11 +11,13 @@
|
|
11 |
|
12 |
document.addEventListener("DOMContentLoaded", function () {
|
13 |
const tokenizeButton = document.querySelector("button[onclick='tokenizeText()']");
|
|
|
14 |
|
15 |
WebAssembly.instantiateStreaming(fetch("main.wasm"), go.importObject).then(result => {
|
16 |
go.run(result.instance);
|
17 |
|
18 |
tokenizeButton.disabled = false;
|
|
|
19 |
});
|
20 |
});
|
21 |
|
@@ -159,6 +161,13 @@
|
|
159 |
width: 110px;
|
160 |
}
|
161 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
162 |
/* Word Tabs */
|
163 |
.word-tabs {
|
164 |
display: flex;
|
@@ -212,6 +221,7 @@
|
|
212 |
<input type="text" id="textInput" placeholder="Enter text here" value="airsickness">
|
213 |
<button onclick="tokenizeText()" disabled>Tokenize</button>
|
214 |
</div>
|
|
|
215 |
<div id="wordTabs" class="word-tabs"></div>
|
216 |
<code id="code" style="display: none;"></code>
|
217 |
<div id="mermaidContainer"></div>
|
|
|
11 |
|
12 |
document.addEventListener("DOMContentLoaded", function () {
|
13 |
const tokenizeButton = document.querySelector("button[onclick='tokenizeText()']");
|
14 |
+
const loadingMessage = document.getElementById("loadingMessage");
|
15 |
|
16 |
WebAssembly.instantiateStreaming(fetch("main.wasm"), go.importObject).then(result => {
|
17 |
go.run(result.instance);
|
18 |
|
19 |
tokenizeButton.disabled = false;
|
20 |
+
loadingMessage.style.display = "none";
|
21 |
});
|
22 |
});
|
23 |
|
|
|
161 |
width: 110px;
|
162 |
}
|
163 |
|
164 |
+
#loadingMessage {
|
165 |
+
text-align: center;
|
166 |
+
font-weight: bold;
|
167 |
+
color: #555;
|
168 |
+
margin-top: 10px;
|
169 |
+
}
|
170 |
+
|
171 |
/* Word Tabs */
|
172 |
.word-tabs {
|
173 |
display: flex;
|
|
|
221 |
<input type="text" id="textInput" placeholder="Enter text here" value="airsickness">
|
222 |
<button onclick="tokenizeText()" disabled>Tokenize</button>
|
223 |
</div>
|
224 |
+
<div id="loadingMessage">Initializing tokenizers...</div>
|
225 |
<div id="wordTabs" class="word-tabs"></div>
|
226 |
<code id="code" style="display: none;"></code>
|
227 |
<div id="mermaidContainer"></div>
|