Visual Question Answering
Transformers
Safetensors
Vietnamese
vision-encoder-decoder
image-text-to-text
Instructions to use TeeA/DONUT-ViChart with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use TeeA/DONUT-ViChart with Transformers:
# Use a pipeline as a high-level helper # Warning: Pipeline type "visual-question-answering" 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("visual-question-answering", model="TeeA/DONUT-ViChart")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("TeeA/DONUT-ViChart") model = AutoModelForMultimodalLM.from_pretrained("TeeA/DONUT-ViChart", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download preprocessor_config.json from TeeA/DONUT-ViChart: direct link, hf CLI and curl.
- Browser
- Download file 756 Bytes
-
https://huggingface.co/TeeA/DONUT-ViChart/resolve/8c1b00d240fffd2d454bb58fd39da9979a4609a7/preprocessor_config.json
- Command line
-
hf download hf://TeeA/DONUT-ViChart@8c1b00d240fffd2d454bb58fd39da9979a4609a7/preprocessor_config.json
-
curl -L -o preprocessor_config.json https://huggingface.co/TeeA/DONUT-ViChart/resolve/8c1b00d240fffd2d454bb58fd39da9979a4609a7/preprocessor_config.json
756 Bytes
| { | |
| "_valid_processor_keys": [ | |
| "images", | |
| "do_resize", | |
| "size", | |
| "resample", | |
| "do_thumbnail", | |
| "do_align_long_axis", | |
| "do_pad", | |
| "random_padding", | |
| "do_rescale", | |
| "rescale_factor", | |
| "do_normalize", | |
| "image_mean", | |
| "image_std", | |
| "return_tensors", | |
| "data_format", | |
| "input_data_format" | |
| ], | |
| "do_align_long_axis": false, | |
| "do_normalize": true, | |
| "do_pad": true, | |
| "do_rescale": true, | |
| "do_resize": true, | |
| "do_thumbnail": true, | |
| "image_mean": [ | |
| 0.5, | |
| 0.5, | |
| 0.5 | |
| ], | |
| "image_processor_type": "DonutImageProcessor", | |
| "image_std": [ | |
| 0.5, | |
| 0.5, | |
| 0.5 | |
| ], | |
| "processor_class": "DonutProcessor", | |
| "resample": 2, | |
| "rescale_factor": 0.00392156862745098, | |
| "size": [ | |
| 960, | |
| 1280 | |
| ] | |
| } | |