Spaces:
Sleeping
Sleeping
Commit
·
5dde632
1
Parent(s):
c5f7df2
Update app.py
Browse files
app.py
CHANGED
|
@@ -12,7 +12,9 @@ if file is not None:
|
|
| 12 |
|
| 13 |
# Read the image data
|
| 14 |
image = Image.open(file)
|
| 15 |
-
|
|
|
|
|
|
|
| 16 |
|
| 17 |
processor = TrOCRProcessor.from_pretrained('microsoft/trocr-small-handwritten')
|
| 18 |
model = VisionEncoderDecoderModel.from_pretrained('microsoft/trocr-small-handwritten')
|
|
|
|
| 12 |
|
| 13 |
# Read the image data
|
| 14 |
image = Image.open(file)
|
| 15 |
+
image=image.convert("RGB")
|
| 16 |
+
|
| 17 |
+
#resized_image = image.resize((384, 384))
|
| 18 |
|
| 19 |
processor = TrOCRProcessor.from_pretrained('microsoft/trocr-small-handwritten')
|
| 20 |
model = VisionEncoderDecoderModel.from_pretrained('microsoft/trocr-small-handwritten')
|