[LayoutLM] Add clarification to docs (#18716)

* Add clarification

* Add another clarification

* Apply suggestion

Co-authored-by: Niels Rogge <nielsrogge@Nielss-MacBook-Pro.local>
This commit is contained in:
NielsRogge
2022-09-02 14:48:19 +02:00
committed by GitHub
parent 129d73294e
commit c60dd98e87
3 changed files with 6 additions and 3 deletions

View File

@@ -67,7 +67,8 @@ occurs. Those can be obtained using the Python Image Library (PIL) library for e
```python
from PIL import Image
image = Image.open("name_of_your_document - can be a png file, pdf, etc.")
# Document can be a png, jpg, etc. PDFs must be converted to images.
image = Image.open(name_of_your_document).convert("RGB")
width, height = image.size
```