Spaces:
Running
Running
Update index.js
Browse files
index.js
CHANGED
|
@@ -57,10 +57,10 @@ async function detect(url) {
|
|
| 57 |
status.textContent = 'Analysing...';
|
| 58 |
|
| 59 |
// Preprocess image
|
| 60 |
-
const
|
| 61 |
|
| 62 |
// Predict bounding boxes
|
| 63 |
-
const { output0 } = await model({ images: pixel_values });
|
| 64 |
|
| 65 |
status.textContent = '';
|
| 66 |
|
|
|
|
| 57 |
status.textContent = 'Analysing...';
|
| 58 |
|
| 59 |
// Preprocess image
|
| 60 |
+
const inputs = await processor(image);
|
| 61 |
|
| 62 |
// Predict bounding boxes
|
| 63 |
+
const { output0 } = await model({ images: inputs.pixel_values });
|
| 64 |
|
| 65 |
status.textContent = '';
|
| 66 |
|