Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -76,7 +76,8 @@ def get_ocr_result(
|
|
| 76 |
)
|
| 77 |
vis_img = ocr_result.vis()
|
| 78 |
if return_word_box:
|
| 79 |
-
|
|
|
|
| 80 |
ocr_txts = [[i, txt, score] for i, (txt, score) in enumerate(zip(txts, scores))]
|
| 81 |
return vis_img, ocr_txts, ocr_result.elapse
|
| 82 |
|
|
|
|
| 76 |
)
|
| 77 |
vis_img = ocr_result.vis()
|
| 78 |
if return_word_box:
|
| 79 |
+
full_word_results = sum(ocr_result.word_results, ())
|
| 80 |
+
txts, scores, _ = list(zip(*full_word_results))
|
| 81 |
ocr_txts = [[i, txt, score] for i, (txt, score) in enumerate(zip(txts, scores))]
|
| 82 |
return vis_img, ocr_txts, ocr_result.elapse
|
| 83 |
|