Update README.md
Browse files
README.md
CHANGED
@@ -9,7 +9,7 @@ tags:
|
|
9 |
|
10 |
# embaas/sentence-transformers-e5-large-v2
|
11 |
|
12 |
-
This is a
|
13 |
|
14 |
<!--- Describe your model here -->
|
15 |
|
@@ -32,13 +32,35 @@ embeddings = model.encode(sentences)
|
|
32 |
print(embeddings)
|
33 |
```
|
34 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
|
36 |
|
37 |
## Evaluation Results
|
38 |
|
39 |
<!--- Describe how your model was evaluated -->
|
40 |
|
41 |
-
|
42 |
|
43 |
|
44 |
|
|
|
9 |
|
10 |
# embaas/sentence-transformers-e5-large-v2
|
11 |
|
12 |
+
This is a the sentence-transformers version of the [intfloat/e5-large-v2](https://huggingface.co/intfloat/e5-large-v2) model: It maps sentences & paragraphs to a 1024 dimensional dense vector space and can be used for tasks like clustering or semantic search.
|
13 |
|
14 |
<!--- Describe your model here -->
|
15 |
|
|
|
32 |
print(embeddings)
|
33 |
```
|
34 |
|
35 |
+
## Using with API
|
36 |
+
|
37 |
+
You can use the [embaas API](https://embaas.io) to encode your input. Get your free API key from [embaas.io](https://embaas.io)
|
38 |
+
|
39 |
+
```python
|
40 |
+
import requests
|
41 |
+
|
42 |
+
url = "https://api.embaas.io/v1/embeddings/"
|
43 |
+
|
44 |
+
headers = {
|
45 |
+
"Content-Type": "application/json",
|
46 |
+
"Authorization": "Bearer ${YOUR_API_KEY}"
|
47 |
+
}
|
48 |
+
|
49 |
+
data = {
|
50 |
+
"texts": ["This is an example sentence.", "Here is another sentence."],
|
51 |
+
"instruction": "query"
|
52 |
+
"model": "e5-large-v2"
|
53 |
+
}
|
54 |
+
|
55 |
+
response = requests.post(url, json=data, headers=headers)
|
56 |
+
```
|
57 |
|
58 |
|
59 |
## Evaluation Results
|
60 |
|
61 |
<!--- Describe how your model was evaluated -->
|
62 |
|
63 |
+
Find the results of the e5 at the [MTEB leaderboard](https://huggingface.co/spaces/mteb/leaderboard)
|
64 |
|
65 |
|
66 |
|