From 554a6621f60cba4f756f4bed2caaa7e6e5b0a2e3 Mon Sep 17 00:00:00 2001 From: Niels Rogge Date: Mon, 6 Dec 2021 17:58:57 +0000 Subject: [PATCH] Update code example --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b911a67..9de5820 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ import requests # load image from the IAM database 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-base-handwritten') model = VisionEncoderDecoderModel.from_pretrained('microsoft/trocr-base-handwritten')