diff --git a/README.md b/README.md index af720b2..cfa1a66 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ import requests # load image from the IAM database (actually this model is meant to be used on printed text) url = 'https://fki.tic.heia-fr.ch/static/img/a01-122-02-00.jpg' -image = Image.open(requests.get(url, stream=True).raw) +image = Image.open(requests.get(url, stream=True).raw).convert("RGB") processor = TrOCRProcessor.from_pretrained('microsoft/trocr-large-printed') model = VisionEncoderDecoderModel.from_pretrained('microsoft/trocr-large-printed')