Spaces:
Sleeping
Sleeping
Update utils/image_processor.py
Browse files- utils/image_processor.py +3 -2
utils/image_processor.py
CHANGED
@@ -7,8 +7,9 @@ from transformers import TrOCRProcessor, VisionEncoderDecoderModel
|
|
7 |
|
8 |
# ✅ Load TrOCR processor and model once
|
9 |
try:
|
10 |
-
processor = TrOCRProcessor.from_pretrained("microsoft/trocr-base-
|
11 |
-
trocr_model = VisionEncoderDecoderModel.from_pretrained("microsoft/trocr-base-
|
|
|
12 |
print("✅ TrOCR model loaded.")
|
13 |
except Exception as e:
|
14 |
print(f"❌ Failed to load TrOCR model: {e}")
|
|
|
7 |
|
8 |
# ✅ Load TrOCR processor and model once
|
9 |
try:
|
10 |
+
processor = TrOCRProcessor.from_pretrained("microsoft/trocr-base-printed")
|
11 |
+
trocr_model = VisionEncoderDecoderModel.from_pretrained("microsoft/trocr-base-printed")
|
12 |
+
|
13 |
print("✅ TrOCR model loaded.")
|
14 |
except Exception as e:
|
15 |
print(f"❌ Failed to load TrOCR model: {e}")
|