Update README.md
Browse files
README.md
CHANGED
|
@@ -2687,23 +2687,6 @@ embeddings = F.normalize(embeddings, p=2, dim=1)
|
|
| 2687 |
|
| 2688 |
You can use Jina Embedding models directly from transformers package.
|
| 2689 |
|
| 2690 |
-
First, you need to make sure that you are logged into huggingface. You can either use the huggingface-cli tool (after installing the `transformers` package) and pass your [hugginface access token](https://huggingface.co/docs/hub/security-tokens):
|
| 2691 |
-
```bash
|
| 2692 |
-
huggingface-cli login
|
| 2693 |
-
```
|
| 2694 |
-
Alternatively, you can provide the access token as an environment variable in the shell:
|
| 2695 |
-
```bash
|
| 2696 |
-
export HF_TOKEN="<your token here>"
|
| 2697 |
-
```
|
| 2698 |
-
or in Python:
|
| 2699 |
-
```python
|
| 2700 |
-
import os
|
| 2701 |
-
|
| 2702 |
-
os.environ['HF_TOKEN'] = "<your token here>"
|
| 2703 |
-
```
|
| 2704 |
-
|
| 2705 |
-
Then, you can use load and use the model via the `AutoModel` class:
|
| 2706 |
-
|
| 2707 |
```python
|
| 2708 |
!pip install transformers
|
| 2709 |
from transformers import AutoModel
|
|
|
|
| 2687 |
|
| 2688 |
You can use Jina Embedding models directly from transformers package.
|
| 2689 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2690 |
```python
|
| 2691 |
!pip install transformers
|
| 2692 |
from transformers import AutoModel
|