Instructions to use google/pix2struct-textcaps-base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use google/pix2struct-textcaps-base with Transformers:
# Use a pipeline as a high-level helper # Warning: Pipeline type "image-to-text" is no longer supported in transformers v5. # You must load the model directly (see below) or downgrade to v4.x with: # 'pip install "transformers<5.0.0' from transformers import pipeline pipe = pipeline("image-to-text", model="google/pix2struct-textcaps-base")# Load model directly from transformers import AutoProcessor, AutoModelForImageTextToText processor = AutoProcessor.from_pretrained("google/pix2struct-textcaps-base") model = AutoModelForImageTextToText.from_pretrained("google/pix2struct-textcaps-base") - Notebooks
- Google Colab
- Kaggle
Upload Pix2StructForConditionalGeneration
Browse files- config.json +0 -2
config.json
CHANGED
|
@@ -30,7 +30,6 @@
|
|
| 30 |
"encoder_no_repeat_ngram_size": 0,
|
| 31 |
"eos_token_id": 1,
|
| 32 |
"exponential_decay_length_penalty": null,
|
| 33 |
-
"feed_forward_proj": "gated-gelu",
|
| 34 |
"finetuning_task": null,
|
| 35 |
"forced_bos_token_id": null,
|
| 36 |
"forced_eos_token_id": null,
|
|
@@ -43,7 +42,6 @@
|
|
| 43 |
"initializer_range": 0.02,
|
| 44 |
"is_decoder": false,
|
| 45 |
"is_encoder_decoder": false,
|
| 46 |
-
"is_gated_act": true,
|
| 47 |
"label2id": {
|
| 48 |
"LABEL_0": 0,
|
| 49 |
"LABEL_1": 1
|
|
|
|
| 30 |
"encoder_no_repeat_ngram_size": 0,
|
| 31 |
"eos_token_id": 1,
|
| 32 |
"exponential_decay_length_penalty": null,
|
|
|
|
| 33 |
"finetuning_task": null,
|
| 34 |
"forced_bos_token_id": null,
|
| 35 |
"forced_eos_token_id": null,
|
|
|
|
| 42 |
"initializer_range": 0.02,
|
| 43 |
"is_decoder": false,
|
| 44 |
"is_encoder_decoder": false,
|
|
|
|
| 45 |
"label2id": {
|
| 46 |
"LABEL_0": 0,
|
| 47 |
"LABEL_1": 1
|