Fix formatting problems

Signed-off-by: Christoph Auer <cau@zurich.ibm.com>
This commit is contained in:
Christoph Auer 2024-09-23 16:34:32 +02:00
parent 5285017ba9
commit e57e223ab7
2 changed files with 4 additions and 4 deletions

View File

@ -389,7 +389,7 @@ class ConvertedDocument(BaseModel):
# table specific flags # table specific flags
add_table_cell_location=add_table_cell_location, add_table_cell_location=add_table_cell_location,
add_table_cell_label=add_table_cell_label, add_table_cell_label=add_table_cell_label,
add_table_cell_text=add_table_cell_text add_table_cell_text=add_table_cell_text,
) )
def render_element_images( def render_element_images(

View File

@ -156,7 +156,7 @@ def verify_conversion_result(
fw.write(doc_pred_md) fw.write(doc_pred_md)
with open(dt_path, "w") as fw: with open(dt_path, "w") as fw:
fw.write(doc_pred_dt) fw.write(doc_pred_dt)
else: # default branch in test else: # default branch in test
with open(pages_path, "r") as fr: with open(pages_path, "r") as fr:
doc_true_pages = PageList.validate_json(fr.read()) doc_true_pages = PageList.validate_json(fr.read())
@ -168,7 +168,7 @@ def verify_conversion_result(
doc_true_md = fr.read() doc_true_md = fr.read()
with open(dt_path, "r") as fr: with open(dt_path, "r") as fr:
doc_true_dt = fr.read() doc_true_dt = fr.read()
assert verify_cells( assert verify_cells(
doc_pred_pages, doc_true_pages doc_pred_pages, doc_true_pages
@ -188,4 +188,4 @@ def verify_conversion_result(
assert verify_dt( assert verify_dt(
doc_pred_dt, doc_true_dt doc_pred_dt, doc_true_dt
), f"Mismatch in DocTags prediction for {input_path}" ), f"Mismatch in DocTags prediction for {input_path}"