Instructions to use openai/clip-vit-base-patch16 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use openai/clip-vit-base-patch16 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("zero-shot-image-classification", model="openai/clip-vit-base-patch16") pipe( "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png", candidate_labels=["animals", "humans", "landscape"], )# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForZeroShotImageClassification processor = AutoProcessor.from_pretrained("openai/clip-vit-base-patch16") model = AutoModelForZeroShotImageClassification.from_pretrained("openai/clip-vit-base-patch16", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download merges.txt from openai/clip-vit-base-patch16: direct link, hf CLI and curl.
- Browser
- Download file 525 kB
-
https://huggingface.co/openai/clip-vit-base-patch16/resolve/main/merges.txt
- Command line
-
hf download hf://openai/clip-vit-base-patch16/merges.txt
-
curl -L -o merges.txt https://huggingface.co/openai/clip-vit-base-patch16/resolve/main/merges.txt
525 kB
File too large to display, you can check the raw version instead.