Update README.md
Browse files
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 |
```
|