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"], )# 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") - Notebooks
- Google Colab
- Kaggle
Update config.json
Browse files- config.json +2 -0
config.json
CHANGED
|
@@ -57,6 +57,7 @@
|
|
| 57 |
"pad_token_id": 1,
|
| 58 |
"prefix": null,
|
| 59 |
"problem_type": null,
|
|
|
|
| 60 |
"pruned_heads": {},
|
| 61 |
"remove_invalid_values": false,
|
| 62 |
"repetition_penalty": 1.0,
|
|
@@ -131,6 +132,7 @@
|
|
| 131 |
"patch_size": 16,
|
| 132 |
"prefix": null,
|
| 133 |
"problem_type": null,
|
|
|
|
| 134 |
"pruned_heads": {},
|
| 135 |
"remove_invalid_values": false,
|
| 136 |
"repetition_penalty": 1.0,
|
|
|
|
| 57 |
"pad_token_id": 1,
|
| 58 |
"prefix": null,
|
| 59 |
"problem_type": null,
|
| 60 |
+
"projection_dim" : 512,
|
| 61 |
"pruned_heads": {},
|
| 62 |
"remove_invalid_values": false,
|
| 63 |
"repetition_penalty": 1.0,
|
|
|
|
| 132 |
"patch_size": 16,
|
| 133 |
"prefix": null,
|
| 134 |
"problem_type": null,
|
| 135 |
+
"projection_dim" : 512,
|
| 136 |
"pruned_heads": {},
|
| 137 |
"remove_invalid_values": false,
|
| 138 |
"repetition_penalty": 1.0,
|