Xenova HF staff commited on
Commit
ac49be6
1 Parent(s): 64c6686

Update index.js

Browse files
Files changed (1) hide show
  1. index.js +2 -2
index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { env, AutoProcessor, AutoModel, RawImage } from 'https://cdn.jsdelivr.net/npm/@xenova/transformers@2.15.1';
2
 
3
  // Since we will download the model from the Hugging Face Hub, we can skip the local model check
4
  env.allowLocalModels = false;
@@ -65,7 +65,7 @@ async function detect(url) {
65
  status.textContent = '';
66
 
67
  const sizes = inputs.reshaped_input_sizes[0].reverse();
68
- outputs.tolist()[0].forEach(x => renderBox(x, sizes));
69
  }
70
 
71
  // Render a bounding box and label on the image
 
1
+ import { env, AutoProcessor, AutoModel, RawImage } from 'https://cdn.jsdelivr.net/npm/@xenova/transformers@2.17.1';
2
 
3
  // Since we will download the model from the Hugging Face Hub, we can skip the local model check
4
  env.allowLocalModels = false;
 
65
  status.textContent = '';
66
 
67
  const sizes = inputs.reshaped_input_sizes[0].reverse();
68
+ output0.tolist()[0].forEach(x => renderBox(x, sizes));
69
  }
70
 
71
  // Render a bounding box and label on the image