Instructions to use 5CD-AI/ColVintern-1B-v1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use 5CD-AI/ColVintern-1B-v1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="5CD-AI/ColVintern-1B-v1", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("5CD-AI/ColVintern-1B-v1", trust_remote_code=True, device_map="auto") - ColPali
How to use 5CD-AI/ColVintern-1B-v1 with ColPali:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -124,11 +124,10 @@ scores = processor.score_multi_vector(query_embeddings, image_embeddings)
|
|
| 124 |
max_scores, max_indices = torch.max(scores, dim=1)
|
| 125 |
# In ra kết quả cho mỗi câu hỏi
|
| 126 |
for i, query in enumerate(queries):
|
| 127 |
-
image_name = images[max_indices[i]]
|
| 128 |
print(f"Câu hỏi: '{query}'")
|
| 129 |
print(f"Điểm số: {max_scores[i].item()}\n")
|
| 130 |
plt.figure(figsize=(5,5))
|
| 131 |
-
plt.imshow(
|
| 132 |
plt.show()
|
| 133 |
```
|
| 134 |
|
|
|
|
| 124 |
max_scores, max_indices = torch.max(scores, dim=1)
|
| 125 |
# In ra kết quả cho mỗi câu hỏi
|
| 126 |
for i, query in enumerate(queries):
|
|
|
|
| 127 |
print(f"Câu hỏi: '{query}'")
|
| 128 |
print(f"Điểm số: {max_scores[i].item()}\n")
|
| 129 |
plt.figure(figsize=(5,5))
|
| 130 |
+
plt.imshow(images[max_indices[i]])
|
| 131 |
plt.show()
|
| 132 |
```
|
| 133 |
|