Update README.md
Browse files
README.md
CHANGED
@@ -17,10 +17,10 @@ npm i @xenova/transformers
|
|
17 |
```js
|
18 |
import { pipeline } from '@xenova/transformers';
|
19 |
|
20 |
-
|
21 |
|
22 |
-
|
23 |
-
|
24 |
// [{
|
25 |
// "score": 0.9976370930671692,
|
26 |
// "label": "remote",
|
|
|
17 |
```js
|
18 |
import { pipeline } from '@xenova/transformers';
|
19 |
|
20 |
+
const detector = await pipeline('object-detection', 'Xenova/detr-resnet-50');
|
21 |
|
22 |
+
const img = 'https://huggingface.co/datasets/Xenova/transformers.js-docs/resolve/main/cats.jpg';
|
23 |
+
const output = await detector(img, { threshold: 0.9 });
|
24 |
// [{
|
25 |
// "score": 0.9976370930671692,
|
26 |
// "label": "remote",
|