Spaces:
Sleeping
Sleeping
Update app_pages/ocr_comparator.py
Browse files
app_pages/ocr_comparator.py
CHANGED
|
@@ -474,10 +474,11 @@ def app():
|
|
| 474 |
|
| 475 |
## ------- PPOCR Text detection
|
| 476 |
with st.spinner('PPOCR Text detection in progress ...'):
|
| 477 |
-
|
|
|
|
| 478 |
# Visualization
|
| 479 |
if ppocr_boxes_coordinates:
|
| 480 |
-
ppocr_image_detect = draw_detected(_in_list_images[0], ppocr_boxes_coordinates
|
| 481 |
in_color, 'None', 3)
|
| 482 |
else:
|
| 483 |
ppocr_image_detect = ppocr_status
|
|
|
|
| 474 |
|
| 475 |
## ------- PPOCR Text detection
|
| 476 |
with st.spinner('PPOCR Text detection in progress ...'):
|
| 477 |
+
list_ppocr_boxes_coordinates, ppocr_status = ppocr_detect(_in_list_readers[1], in_image_path)
|
| 478 |
+
ppocr_boxes_coordinates = list_ppocr_boxes_coordinates[0]
|
| 479 |
# Visualization
|
| 480 |
if ppocr_boxes_coordinates:
|
| 481 |
+
ppocr_image_detect = draw_detected(_in_list_images[0], ppocr_boxes_coordinates, \
|
| 482 |
in_color, 'None', 3)
|
| 483 |
else:
|
| 484 |
ppocr_image_detect = ppocr_status
|