Can't use in a transformer

#1
by ericlee748 - opened

Hello!

I tried the code to run this model from a transformer:

from transformers import AutoProcessor, AutoModelForSeq2SeqLM
processor = AutoProcessor.from_pretrained("google/matcha-chart2text-pew")
model = AutoModelForSeq2SeqLM.from_pretrained("google/matcha-chart2text-pew")

But I'm getting this error message:

AttributeError Traceback (most recent call last)
Input In [3], in <cell line: 3>()
1 from transformers import AutoProcessor, AutoModelForSeq2SeqLM
----> 3 processor = AutoProcessor.from_pretrained("google/matcha-chart2text-pew")
5 model = AutoModelForSeq2SeqLM.from_pretrained("google/matcha-chart2text-pew")

File /opt/anaconda3/lib/python3.9/site-packages/transformers/models/auto/processing_auto.py:264, in AutoProcessor.from_pretrained(cls, pretrained_model_name_or_path, **kwargs)
261 else:
262 processor_class = processor_class_from_name(processor_class)
--> 264 return processor_class.from_pretrained(
265 pretrained_model_name_or_path, trust_remote_code=trust_remote_code, **kwargs
266 )
268 # Last try: we use the PROCESSOR_MAPPING.
269 if type(config) in PROCESSOR_MAPPING:

AttributeError: 'NoneType' object has no attribute 'from_pretrained'

Has anyone seen this before?

Sign up or log in to comment