hantech commited on
Commit
82bf8fc
·
verified ·
1 Parent(s): a3a6c86

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -34,7 +34,10 @@ def viet_ocr_predict(inp):
34
  return out
35
  def predict(filepath):
36
  bounds = reader.readtext(filepath)
37
- inp = cv2.imread(filepath)
 
 
 
38
 
39
  width, height, _ = inp.shape
40
  if width>height:
 
34
  return out
35
  def predict(filepath):
36
  bounds = reader.readtext(filepath)
37
+ im = Image.open(filepath)
38
+ inp = numpy.asarray(im)
39
+
40
+ #inp = cv2.imread(filepath)
41
 
42
  width, height, _ = inp.shape
43
  if width>height: