Commit 983aef75 authored by myhloli's avatar myhloli
Browse files

refactor: clean up code formatting in batch_analyze.py

parent c3531d72
...@@ -249,16 +249,12 @@ class BatchAnalyze: ...@@ -249,16 +249,12 @@ class BatchAnalyze:
_lang = table_res_dict['lang'] _lang = table_res_dict['lang']
table_model = atom_model_manager.get_atom_model( table_model = atom_model_manager.get_atom_model(
atom_model_name='table', atom_model_name='table',
device='cpu',
lang=_lang, lang=_lang,
table_sub_model_name='slanet_plus'
) )
html_code, table_cell_bboxes, logic_points, elapse = table_model.predict(table_res_dict['table_img']) html_code, table_cell_bboxes, logic_points, elapse = table_model.predict(table_res_dict['table_img'])
# 判断是否返回正常 # 判断是否返回正常
if html_code: if html_code:
expected_ending = html_code.strip().endswith( expected_ending = html_code.strip().endswith('</html>') or html_code.strip().endswith('</table>')
'</html>'
) or html_code.strip().endswith('</table>')
if expected_ending: if expected_ending:
table_res_dict['table_res']['html'] = html_code table_res_dict['table_res']['html'] = html_code
else: else:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment