Spaces:
Build error
Build error
debu das
commited on
Commit
•
5ca3204
1
Parent(s):
7fa0911
Update app.py
Browse files
app.py
CHANGED
@@ -48,7 +48,7 @@ async def pytess(cell_pil_img):
|
|
48 |
paddle_output=' '
|
49 |
cell_cv_img=PIL_to_cv(cell_pil_img)
|
50 |
height, width, channels = cell_cv_img.shape
|
51 |
-
if height>=
|
52 |
ocr = PaddleOCR(use_angle_cls=True,use_space_char=True) # need to run only once to download and load model into memory
|
53 |
result = ocr.ocr(cell_cv_img,cls=True)
|
54 |
print(result)
|
|
|
48 |
paddle_output=' '
|
49 |
cell_cv_img=PIL_to_cv(cell_pil_img)
|
50 |
height, width, channels = cell_cv_img.shape
|
51 |
+
if height>=10 and width>=10:
|
52 |
ocr = PaddleOCR(use_angle_cls=True,use_space_char=True) # need to run only once to download and load model into memory
|
53 |
result = ocr.ocr(cell_cv_img,cls=True)
|
54 |
print(result)
|