from huggingface_hub import notebook_login
notebook_login()

Let's define some global variables.

model_checkpoint = "microsoft/layoutlmv2-base-uncased"
batch_size = 4

Load the data
In this guide we use a small sample of preprocessed DocVQA that you can find on 🤗 Hub. If you'd like to use the full
DocVQA dataset, you can register and download it on DocVQA homepage. If you do so, to
proceed with this guide check out how to load files into a 🤗 dataset.