upload
Browse files
README.md
CHANGED
@@ -19,7 +19,8 @@ pip install -U sentence-transformers
|
|
19 |
|
20 |
Then you can use the model like this:
|
21 |
```python
|
22 |
-
from sentence_transformers import SentenceTransformer
|
|
|
23 |
query = "How many people live in London?"
|
24 |
docs = ["Around 9 Million people live in London", "London is known for its financial district"]
|
25 |
|
@@ -42,7 +43,6 @@ doc_score_pairs = sorted(doc_score_pairs, key=lambda x: x[1], reverse=True)
|
|
42 |
#Output passages & scores
|
43 |
for doc, score in doc_score_pairs:
|
44 |
print(score, doc)
|
45 |
-
|
46 |
```
|
47 |
|
48 |
|
|
|
19 |
|
20 |
Then you can use the model like this:
|
21 |
```python
|
22 |
+
from sentence_transformers import SentenceTransformer, util
|
23 |
+
|
24 |
query = "How many people live in London?"
|
25 |
docs = ["Around 9 Million people live in London", "London is known for its financial district"]
|
26 |
|
|
|
43 |
#Output passages & scores
|
44 |
for doc, score in doc_score_pairs:
|
45 |
print(score, doc)
|
|
|
46 |
```
|
47 |
|
48 |
|