Not able to import Pix2StructForConditionalGeneration, Pix2StructProcessor

#3
by tushar729 - opened

While trying out the code, I am not able to import the packages Pix2StructForConditionalGeneration, Pix2StructProcessor. I have the latest version of transformers and pytorch installed. Following are the package version and error details :

tensorflow                   2.12.0
torch                        2.0.0+cpu
torchaudio                   2.0.1+cpu
torchvision                  0.15.1+cpu
transformers                 4.27.3

image.png

Hi @tushar729
Thanks so much for your interest in running the model !
Please use the main branch of transformers to properly use Pix2Struct:

pip install git+https://github.com/huggingface/transformers.git

Hi @ybelkada why not run a space (deploy as a gradio app) so that other users can just use it? Or at least leverage the code.

Sign up or log in to comment