Instructions to use google/pix2struct-ocrvqa-large with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use google/pix2struct-ocrvqa-large 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="google/pix2struct-ocrvqa-large")# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("google/pix2struct-ocrvqa-large") model = AutoModelForMultimodalLM.from_pretrained("google/pix2struct-ocrvqa-large", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Commit History
Update README.md b3e9f24
Update config.json 971ee8b
Update config.json bc47729
Create README.md 3a7db45
Upload processor 430197e
Upload Pix2StructForConditionalGeneration 5cacd7c
initial commit 999c069
Younes Belkada commited on