Update README.md
Browse files
README.md
CHANGED
@@ -23,4 +23,18 @@ The general architecture and experimental results of ViSoBERT can be found in ou
|
|
23 |
}
|
24 |
|
25 |
|
26 |
-
**Please CITE** our paper when ViSoBERT is used to help produce published results or is incorporated into other software.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
}
|
24 |
|
25 |
|
26 |
+
**Please CITE** our paper when ViSoBERT is used to help produce published results or is incorporated into other software.
|
27 |
+
|
28 |
+
**Installation** Install `transformers` with pip: `pip install transformers` and `SentencePiece` with `pip install SentencePiece`
|
29 |
+
|
30 |
+
**Example usage**
|
31 |
+
from transformers import AutoModel,AutoTokenizer
|
32 |
+
import torch
|
33 |
+
|
34 |
+
model= AutoModel.from_pretrained('uitnlp/visobert')
|
35 |
+
tokenizer = AutoTokenizer.from_pretrained('uitnlp/visobert')
|
36 |
+
|
37 |
+
encoding = tokenizer('dau xanh rau ma',return_tensors='pt')
|
38 |
+
|
39 |
+
with torch.no_grad():
|
40 |
+
output = model(**encoding)
|