Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -3,8 +3,8 @@ from transformers import TrOCRProcessor, VisionEncoderDecoderModel
|
|
3 |
import requests
|
4 |
from PIL import Image
|
5 |
|
6 |
-
processor = TrOCRProcessor.from_pretrained("microsoft/trocr-
|
7 |
-
model = VisionEncoderDecoderModel.from_pretrained("microsoft/trocr-
|
8 |
# 2 cpu and 16gib ram
|
9 |
def process_image(image):
|
10 |
pixel_values = processor(image, return_tensors="pt").pixel_values
|
|
|
3 |
import requests
|
4 |
from PIL import Image
|
5 |
|
6 |
+
processor = TrOCRProcessor.from_pretrained("microsoft/trocr-base-handwritten")
|
7 |
+
model = VisionEncoderDecoderModel.from_pretrained("microsoft/trocr-base-handwritten")
|
8 |
# 2 cpu and 16gib ram
|
9 |
def process_image(image):
|
10 |
pixel_values = processor(image, return_tensors="pt").pixel_values
|