update Readme
Browse files
README.md
CHANGED
@@ -5,11 +5,12 @@ tags:
|
|
5 |
- feature-extraction
|
6 |
- sentence-similarity
|
7 |
- transformers
|
|
|
8 |
---
|
9 |
|
10 |
-
# {
|
11 |
|
12 |
-
This is a [sentence-transformers](https://www.SBERT.net) model: It maps sentences & paragraphs to a 768 dimensional dense vector space and can be used for tasks like clustering or semantic search.
|
13 |
|
14 |
<!--- Describe your model here -->
|
15 |
|
@@ -25,9 +26,9 @@ Then you can use the model like this:
|
|
25 |
|
26 |
```python
|
27 |
from sentence_transformers import SentenceTransformer
|
28 |
-
sentences = ["
|
29 |
|
30 |
-
model = SentenceTransformer('
|
31 |
embeddings = model.encode(sentences)
|
32 |
print(embeddings)
|
33 |
```
|
@@ -50,11 +51,11 @@ def mean_pooling(model_output, attention_mask):
|
|
50 |
|
51 |
|
52 |
# Sentences we want sentence embeddings for
|
53 |
-
sentences = ['
|
54 |
|
55 |
# Load model from HuggingFace Hub
|
56 |
-
tokenizer = AutoTokenizer.from_pretrained('
|
57 |
-
model = AutoModel.from_pretrained('
|
58 |
|
59 |
# Tokenize sentences
|
60 |
encoded_input = tokenizer(sentences, padding=True, truncation=True, return_tensors='pt')
|
|
|
5 |
- feature-extraction
|
6 |
- sentence-similarity
|
7 |
- transformers
|
8 |
+
- vietnamese
|
9 |
---
|
10 |
|
11 |
+
# {vietnamese-sbert}
|
12 |
|
13 |
+
This is a [sentence-transformers](https://www.SBERT.net) model: It maps sentences & paragraphs to a 768 dimensional dense vector space and can be used for tasks like clustering or semantic search on Vietnamese language.
|
14 |
|
15 |
<!--- Describe your model here -->
|
16 |
|
|
|
26 |
|
27 |
```python
|
28 |
from sentence_transformers import SentenceTransformer
|
29 |
+
sentences = ["Cô giáo đang ăn kem", "Chị gái đang thử món thịt dê"]
|
30 |
|
31 |
+
model = SentenceTransformer('keepitreal/vietnamese-sbert')
|
32 |
embeddings = model.encode(sentences)
|
33 |
print(embeddings)
|
34 |
```
|
|
|
51 |
|
52 |
|
53 |
# Sentences we want sentence embeddings for
|
54 |
+
sentences = ['Cô giáo đang ăn kem', 'Chị gái đang thử món thịt dê']
|
55 |
|
56 |
# Load model from HuggingFace Hub
|
57 |
+
tokenizer = AutoTokenizer.from_pretrained(''keepitreal/vietnamese-sbert')
|
58 |
+
model = AutoModel.from_pretrained('keepitreal/vietnamese-sbert')
|
59 |
|
60 |
# Tokenize sentences
|
61 |
encoded_input = tokenizer(sentences, padding=True, truncation=True, return_tensors='pt')
|