Add appropriate image to the code example
This commit is contained in:
parent
381e944805
commit
0aa347229f
|
@ -28,7 +28,8 @@ from transformers import TrOCRProcessor, VisionEncoderDecoderModel
|
||||||
from PIL import Image
|
from PIL import Image
|
||||||
import requests
|
import requests
|
||||||
|
|
||||||
url = 'http://images.cocodataset.org/val2017/000000039769.jpg'
|
# 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)
|
||||||
|
|
||||||
processor = TrOCRProcessor.from_pretrained('microsoft/trocr-base-handwritten')
|
processor = TrOCRProcessor.from_pretrained('microsoft/trocr-base-handwritten')
|
||||||
|
|
Loading…
Reference in New Issue