Spaces:
Build error
Build error
debu das
commited on
Commit
•
4eb5481
1
Parent(s):
101f23d
Update app.py
Browse files
app.py
CHANGED
@@ -49,16 +49,19 @@ async def pytess(cell_pil_img):
|
|
49 |
cell_cv_img=PIL_to_cv(cell_pil_img)
|
50 |
ocr = PaddleOCR(use_angle_cls=True,use_space_char=True) # need to run only once to download and load model into memory
|
51 |
result = ocr.ocr(cell_cv_img,cls=True)
|
|
|
|
|
52 |
for idx in range(len(result)):
|
53 |
res = result[idx]
|
54 |
for line in res:
|
55 |
print(line)
|
56 |
print(line[1][0])
|
57 |
print("____________________________@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@")
|
58 |
-
paddle_output=paddle_output
|
59 |
print("pytess_output@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@")
|
60 |
print(paddle_output)
|
61 |
print("paddleocr$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$")
|
|
|
62 |
return str(paddle_output)
|
63 |
|
64 |
# def super_res(pil_img):
|
|
|
49 |
cell_cv_img=PIL_to_cv(cell_pil_img)
|
50 |
ocr = PaddleOCR(use_angle_cls=True,use_space_char=True) # need to run only once to download and load model into memory
|
51 |
result = ocr.ocr(cell_cv_img,cls=True)
|
52 |
+
print(result)
|
53 |
+
print("___________________________________________________________")
|
54 |
for idx in range(len(result)):
|
55 |
res = result[idx]
|
56 |
for line in res:
|
57 |
print(line)
|
58 |
print(line[1][0])
|
59 |
print("____________________________@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@")
|
60 |
+
paddle_output=paddle_output+line[1][0]
|
61 |
print("pytess_output@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@")
|
62 |
print(paddle_output)
|
63 |
print("paddleocr$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$")
|
64 |
+
st.image(cell_pil_img, caption=paddle_output)
|
65 |
return str(paddle_output)
|
66 |
|
67 |
# def super_res(pil_img):
|