Xenova HF Staff commited on
Commit
c552aa8
·
verified ·
1 Parent(s): 7ec4df6

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +1 -1
README.md CHANGED
@@ -23,7 +23,7 @@ import { pipeline } from '@huggingface/transformers';
23
 
24
  const segmenter = await pipeline('background-removal', 'onnx-community/BEN2-ONNX');
25
  const url = 'https://huggingface.co/datasets/Xenova/transformers.js-docs/resolve/main/woman-with-afro_medium.jpg';
26
- const output = await segmenter(url);
27
  output[0].save('mask.png');
28
  // You can also use `output[0].toCanvas()` or `await output[0].toBlob()` if you would like to access the output without saving.
29
  ```
 
23
 
24
  const segmenter = await pipeline('background-removal', 'onnx-community/BEN2-ONNX');
25
  const url = 'https://huggingface.co/datasets/Xenova/transformers.js-docs/resolve/main/woman-with-afro_medium.jpg';
26
+ const output = await segmenter([url]);
27
  output[0].save('mask.png');
28
  // You can also use `output[0].toCanvas()` or `await output[0].toBlob()` if you would like to access the output without saving.
29
  ```