Instructions to use TJKlein/CLIP-ViT with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use TJKlein/CLIP-ViT with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("zero-shot-image-classification", model="TJKlein/CLIP-ViT") 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("TJKlein/CLIP-ViT") model = AutoModelForZeroShotImageClassification.from_pretrained("TJKlein/CLIP-ViT") - Notebooks
- Google Colab
- Kaggle
| { | |
| "add_prefix_space": false, | |
| "bos_token": { | |
| "__type": "AddedToken", | |
| "content": "<|startoftext|>", | |
| "lstrip": false, | |
| "normalized": true, | |
| "rstrip": false, | |
| "single_word": false | |
| }, | |
| "clean_up_tokenization_spaces": true, | |
| "do_lower_case": true, | |
| "eos_token": { | |
| "__type": "AddedToken", | |
| "content": "<|endoftext|>", | |
| "lstrip": false, | |
| "normalized": true, | |
| "rstrip": false, | |
| "single_word": false | |
| }, | |
| "errors": "replace", | |
| "model_max_length": 77, | |
| "pad_token": "<|endoftext|>", | |
| "tokenizer_class": "CLIPTokenizer", | |
| "unk_token": { | |
| "__type": "AddedToken", | |
| "content": "<|endoftext|>", | |
| "lstrip": false, | |
| "normalized": true, | |
| "rstrip": false, | |
| "single_word": false | |
| } | |
| } | |