Spaces:
Running
Running
Update index.js
Browse files
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 =
|
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'
|
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) => {
|