Update index.html
Browse files- index.html +2 -2
index.html
CHANGED
|
@@ -171,7 +171,7 @@
|
|
| 171 |
AutoProcessor,
|
| 172 |
RawImage,
|
| 173 |
Tensor,
|
| 174 |
-
} from "https://cdn.jsdelivr.net/npm/@huggingface/transformers@
|
| 175 |
|
| 176 |
const statusLabel = document.getElementById("status");
|
| 177 |
const fileUpload = document.getElementById("upload");
|
|
@@ -200,7 +200,7 @@
|
|
| 200 |
* Encodes the image and generates embeddings.
|
| 201 |
*/
|
| 202 |
async function encode(url) {
|
| 203 |
-
if (isEncoding) return;
|
| 204 |
isEncoding = true;
|
| 205 |
statusLabel.textContent = "Extracting image embedding...";
|
| 206 |
|
|
|
|
| 171 |
AutoProcessor,
|
| 172 |
RawImage,
|
| 173 |
Tensor,
|
| 174 |
+
} from "https://cdn.jsdelivr.net/npm/@huggingface/transformers@next";
|
| 175 |
|
| 176 |
const statusLabel = document.getElementById("status");
|
| 177 |
const fileUpload = document.getElementById("upload");
|
|
|
|
| 200 |
* Encodes the image and generates embeddings.
|
| 201 |
*/
|
| 202 |
async function encode(url) {
|
| 203 |
+
if (isEncoding || !processor || !model) return;
|
| 204 |
isEncoding = true;
|
| 205 |
statusLabel.textContent = "Extracting image embedding...";
|
| 206 |
|