NghiemAbe commited on
Commit
c42e9df
·
verified ·
1 Parent(s): b0f0df6

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +3 -2
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
- sentences = ["This is an example sentence", "Each sentence is converted"]
 
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 = ['This is an example sentence', 'Each sentence is converted']
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')