Update README.md
Browse files
README.md
CHANGED
@@ -22,7 +22,7 @@ npm i @huggingface/transformers
|
|
22 |
import { pipeline } from '@huggingface/transformers';
|
23 |
|
24 |
const segmenter = await pipeline('background-removal', 'onnx-community/ormbg-ONNX');
|
25 |
-
const url = 'https://
|
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.
|
|
|
22 |
import { pipeline } from '@huggingface/transformers';
|
23 |
|
24 |
const segmenter = await pipeline('background-removal', 'onnx-community/ormbg-ONNX');
|
25 |
+
const url = 'https://images.pexels.com/photos/5965592/pexels-photo-5965592.jpeg?auto=compress&cs=tinysrgb&w=1024';
|
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.
|