Instructions to use hf-internal-testing/tiny-random-CLIPForImageClassification with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use hf-internal-testing/tiny-random-CLIPForImageClassification with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="hf-internal-testing/tiny-random-CLIPForImageClassification") pipe("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png")# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForImageClassification processor = AutoProcessor.from_pretrained("hf-internal-testing/tiny-random-CLIPForImageClassification") model = AutoModelForImageClassification.from_pretrained("hf-internal-testing/tiny-random-CLIPForImageClassification", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download tokenizer_config.json from hf-internal-testing/tiny-random-CLIPForImageClassification: direct link, hf CLI and curl.
- Browser
- Download file 697 Bytes
-
https://huggingface.co/hf-internal-testing/tiny-random-CLIPForImageClassification/resolve/b9ef763aae3f943f48e9478f38c81b61a0de76a1/tokenizer_config.json
- Command line
-
hf download hf://hf-internal-testing/tiny-random-CLIPForImageClassification@b9ef763aae3f943f48e9478f38c81b61a0de76a1/tokenizer_config.json
-
curl -L -o tokenizer_config.json https://huggingface.co/hf-internal-testing/tiny-random-CLIPForImageClassification/resolve/b9ef763aae3f943f48e9478f38c81b61a0de76a1/tokenizer_config.json
697 Bytes
| { | |
| "add_prefix_space": false, | |
| "added_tokens_decoder": { | |
| "0": { | |
| "content": "<|startoftext|>", | |
| "lstrip": false, | |
| "normalized": true, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "1": { | |
| "content": "<|endoftext|>", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| } | |
| }, | |
| "bos_token": "<|startoftext|>", | |
| "clean_up_tokenization_spaces": true, | |
| "do_lower_case": true, | |
| "eos_token": "<|endoftext|>", | |
| "errors": "replace", | |
| "model_max_length": 77, | |
| "pad_token": "<|endoftext|>", | |
| "tokenizer_class": "CLIPTokenizer", | |
| "unk_token": "<|endoftext|>" | |
| } | |