philschmid / document-ai-transformers

MIT License
317 stars 47 forks source link

Minor fix to Donut SROIE training #12

Open alienware opened 1 year ago

alienware commented 1 year ago

WHAT

WHY

Fixes AttributeError: 'DonutImageProcessor' object has no attribute 'to_pil_image'

alienware commented 1 year ago

First of all, lots of thanks to you for providing these notebooks and for your writeups. These are a blessings in picking up document AI. :pray:

The fix I'm proposing may not be the ideal one, but what I tried after I couldn't get the to_pil_image statement to work. I'm assuming I am facing this error due to a different transformers version.