Spaces:
Running
Running
Update index.js
Browse files
index.js
CHANGED
|
@@ -46,7 +46,7 @@ async function detect(img) {
|
|
| 46 |
imageContainer.style.backgroundImage = `url(${img})`;
|
| 47 |
|
| 48 |
status.textContent = 'Analysing...';
|
| 49 |
-
const image = await RawImage.read(
|
| 50 |
const { pixel_values } = await processor(image);
|
| 51 |
const { output0 } = await model({ images: pixel_values });
|
| 52 |
const predictions = output0.tolist()[0];
|
|
|
|
| 46 |
imageContainer.style.backgroundImage = `url(${img})`;
|
| 47 |
|
| 48 |
status.textContent = 'Analysing...';
|
| 49 |
+
const image = await RawImage.read(img);
|
| 50 |
const { pixel_values } = await processor(image);
|
| 51 |
const { output0 } = await model({ images: pixel_values });
|
| 52 |
const predictions = output0.tolist()[0];
|