Update app.py
Browse files
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 |
-
|
|
|
|
|
|
|
|
|
|
| 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:
|