WebashalarForML commited on
Commit
00b64c9
1 Parent(s): 60ceda4

Update utility/utils.py

Browse files
Files changed (1) hide show
  1. utility/utils.py +4 -2
utility/utils.py CHANGED
@@ -110,8 +110,10 @@ def process_image(image_path, scale=2):
110
 
111
  def ocr_with_paddle(img):
112
  finaltext = ''
113
- model_dir = os.getenv('PADDLEOCR_MODEL_DIR', '/tmp/.paddleocr')
114
- ocr = PaddleOCR(lang='en', use_angle_cls=True, det_model_dir=model_dir)
 
 
115
  result = ocr.ocr(img)
116
 
117
  for i in range(len(result[0])):
 
110
 
111
  def ocr_with_paddle(img):
112
  finaltext = ''
113
+ #model_dir = os.getenv('PADDLEOCR_MODEL_DIR', '/tmp/.paddleocr')
114
+ #ocr = PaddleOCR(lang='en', use_angle_cls=True, det_model_dir=model_dir)
115
+ ocr = PaddleOCR(lang='en', use_angle_cls=True, det_model_dir=os.environ['PADDLEOCR_HOME'])
116
+
117
  result = ocr.ocr(img)
118
 
119
  for i in range(len(result[0])):