Update README.md
Browse files
README.md
CHANGED
@@ -20,7 +20,7 @@ import { pipeline } from '@xenova/transformers';
|
|
20 |
const extractor = await pipeline('feature-extraction', 'Xenova/bge-base-en-v1.5');
|
21 |
|
22 |
// Compute sentence embeddings
|
23 |
-
const texts = [
|
24 |
const embeddings = await extractor(texts, { pooling: 'mean', normalize: true });
|
25 |
console.log(embeddings);
|
26 |
// Tensor {
|
|
|
20 |
const extractor = await pipeline('feature-extraction', 'Xenova/bge-base-en-v1.5');
|
21 |
|
22 |
// Compute sentence embeddings
|
23 |
+
const texts = ['Hello world.', 'Example sentence.'];
|
24 |
const embeddings = await extractor(texts, { pooling: 'mean', normalize: true });
|
25 |
console.log(embeddings);
|
26 |
// Tensor {
|