SWHL commited on
Commit
fd67ccd
·
verified ·
1 Parent(s): 5aa4ae8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -7
app.py CHANGED
@@ -70,18 +70,13 @@ def get_ocr_result(
70
  ocr_txts = [[i, txt, score] for i, (txt, score) in enumerate(zip(txts, scores))]
71
  return vis_img, ocr_txts, ocr_result.elapse
72
 
73
- if use_det and use_rec:
74
  ocr_txts = [
75
  [i, txt, score]
76
  for i, (txt, score) in enumerate(zip(ocr_result.txts, ocr_result.scores))
77
  ]
78
- elif use_det and not use_cls and not use_rec:
79
  ocr_txts = []
80
- else not use_det and not use_cls and use_rec:
81
- ocr_txts = [
82
- [i, txt, score]
83
- for i, (txt, score) in enumerate(zip(ocr_result.txts, ocr_result.scores))
84
- ]
85
 
86
  return vis_img, ocr_txts, ocr_result.elapse
87
 
 
70
  ocr_txts = [[i, txt, score] for i, (txt, score) in enumerate(zip(txts, scores))]
71
  return vis_img, ocr_txts, ocr_result.elapse
72
 
73
+ if use_rec:
74
  ocr_txts = [
75
  [i, txt, score]
76
  for i, (txt, score) in enumerate(zip(ocr_result.txts, ocr_result.scores))
77
  ]
78
+ else:
79
  ocr_txts = []
 
 
 
 
 
80
 
81
  return vis_img, ocr_txts, ocr_result.elapse
82