Update README.md
Browse files
README.md
CHANGED
@@ -30,7 +30,7 @@ from transformers import TrOCRProcessor, VisionEncoderDecoderModel
|
|
30 |
processor = TrOCRProcessor.from_pretrained("kkatiz/thai-trocr-thaigov-v2")
|
31 |
model = VisionEncoderDecoderModel.from_pretrained("kkatiz/thai-trocr-thaigov-v2")
|
32 |
|
33 |
-
image = Image.open(
|
34 |
pixel_values = processor(image, return_tensors="pt").pixel_values
|
35 |
generated_ids = model.generate(pixel_values)
|
36 |
|
|
|
30 |
processor = TrOCRProcessor.from_pretrained("kkatiz/thai-trocr-thaigov-v2")
|
31 |
model = VisionEncoderDecoderModel.from_pretrained("kkatiz/thai-trocr-thaigov-v2")
|
32 |
|
33 |
+
image = Image.open("... your image path").convert("RGB")
|
34 |
pixel_values = processor(image, return_tensors="pt").pixel_values
|
35 |
generated_ids = model.generate(pixel_values)
|
36 |
|