Update README.md
Browse files
README.md
CHANGED
@@ -27,7 +27,8 @@ Then you can use the model like this:
|
|
27 |
|
28 |
```python
|
29 |
from sentence_transformers import SentenceTransformer
|
30 |
-
|
|
|
31 |
|
32 |
model = SentenceTransformer('NghiemAbe/Vi-Legal-Bi-Encoder-v2')
|
33 |
embeddings = model.encode(sentences)
|
@@ -52,7 +53,7 @@ def mean_pooling(model_output, attention_mask):
|
|
52 |
|
53 |
|
54 |
# Sentences we want sentence embeddings for
|
55 |
-
sentences = [
|
56 |
|
57 |
# Load model from HuggingFace Hub
|
58 |
tokenizer = AutoTokenizer.from_pretrained('NghiemAbe/Vi-Legal-Bi-Encoder-v2')
|
|
|
27 |
|
28 |
```python
|
29 |
from sentence_transformers import SentenceTransformer
|
30 |
+
from pyvi.ViTokenizer import tokenize
|
31 |
+
sentences = [tokenize("This is an example sentence"), tokenize("Each sentence is converted")]
|
32 |
|
33 |
model = SentenceTransformer('NghiemAbe/Vi-Legal-Bi-Encoder-v2')
|
34 |
embeddings = model.encode(sentences)
|
|
|
53 |
|
54 |
|
55 |
# Sentences we want sentence embeddings for
|
56 |
+
sentences = [tokenize("This is an example sentence"), tokenize("Each sentence is converted")]
|
57 |
|
58 |
# Load model from HuggingFace Hub
|
59 |
tokenizer = AutoTokenizer.from_pretrained('NghiemAbe/Vi-Legal-Bi-Encoder-v2')
|