Instructions to use radames/blip_image_embeddings with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use radames/blip_image_embeddings with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="radames/blip_image_embeddings", device_map="auto")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("radames/blip_image_embeddings", dtype="auto", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update pipeline.py
Browse files- pipeline.py +1 -0
pipeline.py
CHANGED
|
@@ -43,6 +43,7 @@ class PreTrainedPipeline():
|
|
| 43 |
A :obj:`dict`:. The object returned should be a dict like {"feature_vector": [0.6331314444541931,0.8802216053009033,...,-0.7866355180740356,]} containing :
|
| 44 |
- "feature_vector": A list of floats corresponding to the image embedding.
|
| 45 |
"""
|
|
|
|
| 46 |
parameters = {"mode": "image"}
|
| 47 |
if isinstance(inputs, str):
|
| 48 |
# decode base64 image to PIL
|
|
|
|
| 43 |
A :obj:`dict`:. The object returned should be a dict like {"feature_vector": [0.6331314444541931,0.8802216053009033,...,-0.7866355180740356,]} containing :
|
| 44 |
- "feature_vector": A list of floats corresponding to the image embedding.
|
| 45 |
"""
|
| 46 |
+
|
| 47 |
parameters = {"mode": "image"}
|
| 48 |
if isinstance(inputs, str):
|
| 49 |
# decode base64 image to PIL
|