Update code example
This commit is contained in:
parent
0aa347229f
commit
554a6621f6
|
@ -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')
|
||||
|
|
Loading…
Reference in New Issue