Xenova HF staff commited on
Commit
3c99293
1 Parent(s): 32a56aa

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +3 -3
README.md CHANGED
@@ -17,10 +17,10 @@ npm i @xenova/transformers
17
  ```js
18
  import { pipeline } from '@xenova/transformers';
19
 
20
- let detector = await pipeline('object-detection', 'Xenova/detr-resnet-50');
21
 
22
- let img = 'https://huggingface.co/datasets/Xenova/transformers.js-docs/resolve/main/cats.jpg';
23
- let output = await detector(img, { threshold: 0.9 });
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",