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