Update README.md
Browse files
README.md
CHANGED
@@ -1802,13 +1802,11 @@ def mean_pooling(model_output, attention_mask):
|
|
1802 |
input_mask_expanded.sum(1), min=1e-9
|
1803 |
)
|
1804 |
|
1805 |
-
|
1806 |
-
# Sentences we want sentence embeddings for
|
1807 |
sentences = ['how is the weather today', 'What is the current weather like today?']
|
1808 |
|
1809 |
# Load model from HuggingFace Hub
|
1810 |
-
tokenizer = AutoTokenizer.from_pretrained('jinaai/jina-embedding-
|
1811 |
-
model = AutoModel.from_pretrained('jinaai/jina-embedding-
|
1812 |
|
1813 |
with torch.inference_mode():
|
1814 |
encoded_input = tokenizer(
|
|
|
1802 |
input_mask_expanded.sum(1), min=1e-9
|
1803 |
)
|
1804 |
|
|
|
|
|
1805 |
sentences = ['how is the weather today', 'What is the current weather like today?']
|
1806 |
|
1807 |
# Load model from HuggingFace Hub
|
1808 |
+
tokenizer = AutoTokenizer.from_pretrained('jinaai/jina-embedding-b-en-v1')
|
1809 |
+
model = AutoModel.from_pretrained('jinaai/jina-embedding-b-en-v1')
|
1810 |
|
1811 |
with torch.inference_mode():
|
1812 |
encoded_input = tokenizer(
|