Xenova HF Staff commited on
Commit
00fa4a6
·
verified ·
1 Parent(s): 1abb7b1

Update index.html

Browse files
Files changed (1) hide show
  1. 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@3.8.0";
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