| # Jina Embeddings V4 | |
| Load the model: | |
| ```python | |
| from transformers import AutoModel | |
| model = AutoModel.from_pretrained('jinaai/jina-embeddings-v4', trust_remote_code=True) | |
| ``` | |
| Encode Text: | |
| ```python | |
| text_embedding = model.encode_texts(['test']) | |
| ``` | |
| Encode Image (very slow on CPU): | |
| ```python | |
| from PIL import Image | |
| img = Image.open('path/to/your/image.png') | |
| image_embedding = m.encode_images([img]) | |
| ``` | |