yeswanthvarma commited on
Commit
b410261
·
verified ·
1 Parent(s): 21202e9

Update utils/image_processor.py

Browse files
Files changed (1) hide show
  1. 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-handwritten")
11
- trocr_model = VisionEncoderDecoderModel.from_pretrained("microsoft/trocr-base-handwritten")
 
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}")