Instructions to use humane-lab/CFT-CLIP with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use humane-lab/CFT-CLIP with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("zero-shot-image-classification", model="humane-lab/CFT-CLIP", device_map="auto") pipe( "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png", candidate_labels=["animals", "humans", "landscape"], )# Load model directly from transformers import AutoProcessor, AutoModelForZeroShotImageClassification processor = AutoProcessor.from_pretrained("humane-lab/CFT-CLIP") model = AutoModelForZeroShotImageClassification.from_pretrained("humane-lab/CFT-CLIP", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -27,8 +27,8 @@ import torch
|
|
| 27 |
from PIL import Image
|
| 28 |
from transformers import AutoModel, AutoProcessor
|
| 29 |
|
| 30 |
-
processor = AutoProcessor.from_pretrained("humane-lab/
|
| 31 |
-
model = AutoModel.from_pretrained("humane-lab/
|
| 32 |
|
| 33 |
|
| 34 |
image = "cat.jpg"
|
|
|
|
| 27 |
from PIL import Image
|
| 28 |
from transformers import AutoModel, AutoProcessor
|
| 29 |
|
| 30 |
+
processor = AutoProcessor.from_pretrained("humane-lab/CFT-CLIP")
|
| 31 |
+
model = AutoModel.from_pretrained("humane-lab/CFT-CLIP")
|
| 32 |
|
| 33 |
|
| 34 |
image = "cat.jpg"
|