Update README.md
Browse files
README.md
CHANGED
|
@@ -8,7 +8,8 @@ tags:
|
|
| 8 |
|
| 9 |
---
|
| 10 |
|
| 11 |
-
|
|
|
|
| 12 |
|
| 13 |
This is a [sentence-transformers](https://www.SBERT.net) model: It maps sentences & paragraphs to a 1024 dimensional dense vector space and can be used for tasks like clustering or semantic search.
|
| 14 |
|
|
@@ -28,7 +29,7 @@ Then you can use the model like this:
|
|
| 28 |
from sentence_transformers import SentenceTransformer
|
| 29 |
sentences = ["This is an example sentence", "Each sentence is converted"]
|
| 30 |
|
| 31 |
-
model = SentenceTransformer('
|
| 32 |
embeddings = model.encode(sentences)
|
| 33 |
print(embeddings)
|
| 34 |
```
|
|
@@ -54,8 +55,8 @@ def mean_pooling(model_output, attention_mask):
|
|
| 54 |
sentences = ['This is an example sentence', 'Each sentence is converted']
|
| 55 |
|
| 56 |
# Load model from HuggingFace Hub
|
| 57 |
-
tokenizer = AutoTokenizer.from_pretrained('
|
| 58 |
-
model = AutoModel.from_pretrained('
|
| 59 |
|
| 60 |
# Tokenize sentences
|
| 61 |
encoded_input = tokenizer(sentences, padding=True, truncation=True, return_tensors='pt')
|
|
@@ -77,7 +78,8 @@ print(sentence_embeddings)
|
|
| 77 |
|
| 78 |
<!--- Describe how your model was evaluated -->
|
| 79 |
|
| 80 |
-
|
|
|
|
| 81 |
|
| 82 |
|
| 83 |
## Training
|
|
|
|
| 8 |
|
| 9 |
---
|
| 10 |
|
| 11 |
+
|
| 12 |
+
# pkedzia/polish-bi-encoder
|
| 13 |
|
| 14 |
This is a [sentence-transformers](https://www.SBERT.net) model: It maps sentences & paragraphs to a 1024 dimensional dense vector space and can be used for tasks like clustering or semantic search.
|
| 15 |
|
|
|
|
| 29 |
from sentence_transformers import SentenceTransformer
|
| 30 |
sentences = ["This is an example sentence", "Each sentence is converted"]
|
| 31 |
|
| 32 |
+
model = SentenceTransformer('pkedzia/polish-bi-encoder')
|
| 33 |
embeddings = model.encode(sentences)
|
| 34 |
print(embeddings)
|
| 35 |
```
|
|
|
|
| 55 |
sentences = ['This is an example sentence', 'Each sentence is converted']
|
| 56 |
|
| 57 |
# Load model from HuggingFace Hub
|
| 58 |
+
tokenizer = AutoTokenizer.from_pretrained('pkedzia/polish-bi-encoder')
|
| 59 |
+
model = AutoModel.from_pretrained('pkedzia/polish-bi-encoder')
|
| 60 |
|
| 61 |
# Tokenize sentences
|
| 62 |
encoded_input = tokenizer(sentences, padding=True, truncation=True, return_tensors='pt')
|
|
|
|
| 78 |
|
| 79 |
<!--- Describe how your model was evaluated -->
|
| 80 |
|
| 81 |
+
|
| 82 |
+

|
| 83 |
|
| 84 |
|
| 85 |
## Training
|