Instructions to use openai/clip-vit-base-patch32 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use openai/clip-vit-base-patch32 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-patch32") 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("openai/clip-vit-base-patch32") model = AutoModelForZeroShotImageClassification.from_pretrained("openai/clip-vit-base-patch32", device_map="auto") - Notebooks
- Google Colab
- Kaggle
License applicable to pretrained CLIP ViT-B/32 weights
#72
by thomeven - opened
Could the OpenAI maintainers clarify the license applicable specifically to the pretrained weight files in openai/clip-vit-base-patch32?
In particular, does OpenAI intend the MIT License from the official openai/CLIP repository to cover the original ViT-B/32 checkpoint and the converted weight files hosted here, including commercial use and redistribution subject to the MIT conditions?
If so, could you add the applicable license identifier and/or LICENSE file to this model repository so downstream users can establish a reliable licensing record?