Update README.md
Browse files
README.md
CHANGED
@@ -15,10 +15,10 @@ npm i @xenova/transformers
|
|
15 |
import { pipeline } from '@xenova/transformers';
|
16 |
|
17 |
// Create feature extraction pipeline
|
18 |
-
const
|
19 |
|
20 |
// Perform feature extraction
|
21 |
-
const output = await
|
22 |
console.log(output)
|
23 |
// Tensor {
|
24 |
// dims: [ 1, 8, 384 ],
|
|
|
15 |
import { pipeline } from '@xenova/transformers';
|
16 |
|
17 |
// Create feature extraction pipeline
|
18 |
+
const extractor = await pipeline('feature-extraction', 'Xenova/conv-bert-medium-small', { quantized: false });
|
19 |
|
20 |
// Perform feature extraction
|
21 |
+
const output = await extractor('This is a test sentence.');
|
22 |
console.log(output)
|
23 |
// Tensor {
|
24 |
// dims: [ 1, 8, 384 ],
|