Add `search_query: ` prefix to transformers.js sample code (#11)
Browse files- Add `search_query: ` prefix to transformers.js sample code (9ab2f92a0ce330cba7b6a7795f875dfa37f9b69f)
Co-authored-by: Joshua <Xenova@users.noreply.huggingface.co>
README.md
CHANGED
@@ -2724,7 +2724,7 @@ const extractor = await pipeline('feature-extraction', 'nomic-ai/nomic-embed-tex
|
|
2724 |
});
|
2725 |
|
2726 |
// Compute sentence embeddings
|
2727 |
-
const texts = ['What is TSNE?', 'Who is Laurens van der Maaten?'];
|
2728 |
const embeddings = await extractor(texts, { pooling: 'mean', normalize: true });
|
2729 |
console.log(embeddings);
|
2730 |
```
|
|
|
2724 |
});
|
2725 |
|
2726 |
// Compute sentence embeddings
|
2727 |
+
const texts = ['search_query: What is TSNE?', 'search_query: Who is Laurens van der Maaten?'];
|
2728 |
const embeddings = await extractor(texts, { pooling: 'mean', normalize: true });
|
2729 |
console.log(embeddings);
|
2730 |
```
|