Instructions to use kakaobrain/align-base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use kakaobrain/align-base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("zero-shot-image-classification", model="kakaobrain/align-base") 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("kakaobrain/align-base") model = AutoModelForZeroShotImageClassification.from_pretrained("kakaobrain/align-base", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Upload processor
Browse files- preprocessor_config.json +1 -1
- tokenizer_config.json +1 -1
preprocessor_config.json
CHANGED
|
@@ -19,7 +19,7 @@
|
|
| 19 |
0.5
|
| 20 |
],
|
| 21 |
"include_top": false,
|
| 22 |
-
"processor_class": "
|
| 23 |
"resample": 2,
|
| 24 |
"rescale_factor": 0.00784313725490196,
|
| 25 |
"rescale_offset": true,
|
|
|
|
| 19 |
0.5
|
| 20 |
],
|
| 21 |
"include_top": false,
|
| 22 |
+
"processor_class": "AlignProcessor",
|
| 23 |
"resample": 2,
|
| 24 |
"rescale_factor": 0.00784313725490196,
|
| 25 |
"rescale_offset": true,
|
tokenizer_config.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
| 6 |
"model_max_length": 64,
|
| 7 |
"never_split": null,
|
| 8 |
"pad_token": "[PAD]",
|
| 9 |
-
"processor_class": "
|
| 10 |
"sep_token": "[SEP]",
|
| 11 |
"special_tokens_map_file": null,
|
| 12 |
"strip_accents": null,
|
|
|
|
| 6 |
"model_max_length": 64,
|
| 7 |
"never_split": null,
|
| 8 |
"pad_token": "[PAD]",
|
| 9 |
+
"processor_class": "AlignProcessor",
|
| 10 |
"sep_token": "[SEP]",
|
| 11 |
"special_tokens_map_file": null,
|
| 12 |
"strip_accents": null,
|