Xenova HF staff commited on
Commit
a42765b
·
verified ·
1 Parent(s): c3d503e

Update index.js

Browse files
Files changed (1) hide show
  1. index.js +2 -2
index.js CHANGED
@@ -11,7 +11,7 @@ const example = document.getElementById('example');
11
 
12
  const EXAMPLE_URL = 'https://huggingface.co/datasets/Xenova/transformers.js-docs/resolve/main/city-streets.jpg';
13
 
14
- const IMAGE_SIZE = 128;
15
 
16
  // Create a new object detection pipeline
17
  status.textContent = 'Loading model...';
@@ -20,7 +20,7 @@ const processor = await AutoProcessor.from_pretrained('Xenova/yolov9-c');
20
  // For this demo, we resize the image to IMAGE_SIZE x IMAGE_SIZE
21
  processor.feature_extractor.size = { width: IMAGE_SIZE, height: IMAGE_SIZE }
22
 
23
- const model = await AutoModel.from_pretrained('Xenova/yolov9-c', { quantized: false });
24
  status.textContent = 'Ready';
25
 
26
  example.addEventListener('click', (e) => {
 
11
 
12
  const EXAMPLE_URL = 'https://huggingface.co/datasets/Xenova/transformers.js-docs/resolve/main/city-streets.jpg';
13
 
14
+ const IMAGE_SIZE = 256;
15
 
16
  // Create a new object detection pipeline
17
  status.textContent = 'Loading model...';
 
20
  // For this demo, we resize the image to IMAGE_SIZE x IMAGE_SIZE
21
  processor.feature_extractor.size = { width: IMAGE_SIZE, height: IMAGE_SIZE }
22
 
23
+ const model = await AutoModel.from_pretrained('Xenova/yolov9-c');
24
  status.textContent = 'Ready';
25
 
26
  example.addEventListener('click', (e) => {