dvilasuero commited on
Commit
2084151
1 Parent(s): 03d3e88

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +13 -0
README.md CHANGED
@@ -95,4 +95,17 @@ dataset_info:
95
  ---
96
  # Dataset Card for "banking77_vectors"
97
 
 
 
 
 
 
 
 
 
 
 
 
 
 
98
  [More Information needed](https://github.com/huggingface/datasets/blob/main/CONTRIBUTING.md#how-to-contribute-to-the-dataset-cards)
 
95
  ---
96
  # Dataset Card for "banking77_vectors"
97
 
98
+
99
+ Install `fast-sentence-transformers`
100
+ ```python
101
+ from fast_sentence_transformers import FastSentenceTransformer as SentenceTransformer
102
+ from datasets import load_dataset
103
+
104
+ # use any sentence-transformer
105
+ encoder = SentenceTransformer("all-MiniLM-L6-v2", device="cpu")
106
+ dataset = load_dataset("banking77", split="test")
107
+ dataset = dataset.map(lambda batch: {"vector": encoder.encode(batch["text"])}, batch_size=32, batched=True)
108
+ ```
109
+
110
+
111
  [More Information needed](https://github.com/huggingface/datasets/blob/main/CONTRIBUTING.md#how-to-contribute-to-the-dataset-cards)