SWHL commited on
Commit
f2fb3d5
·
1 Parent(s): 63dfa2a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -3
app.py CHANGED
@@ -65,9 +65,7 @@ def inference(img_path, box_thresh=0.5, unclip_ratio=1.6, text_score=0.5,
65
  font_path = Path('fonts') / font_dict.get(lan_name)
66
  img_save_path = visualize(img_path, dt_boxes, rec_res, scores,
67
  font_path=str(font_path))
68
- # output_text = [f'{one_rec} {float(score):.4f}'
69
- # for one_rec, score in zip(rec_res, scores)]
70
- out_dict = {i: {'rec_txt': rec, 'score': score}
71
  for i, (rec, score) in enumerate(zip(rec_res, scores))}
72
  return img_save_path, out_dict, out_log
73
 
 
65
  font_path = Path('fonts') / font_dict.get(lan_name)
66
  img_save_path = visualize(img_path, dt_boxes, rec_res, scores,
67
  font_path=str(font_path))
68
+ out_dict = {str(i): {'rec_txt': rec, 'score': f'{score:.5f}'}
 
 
69
  for i, (rec, score) in enumerate(zip(rec_res, scores))}
70
  return img_save_path, out_dict, out_log
71