Added example on how to get original predicted doctags in minimal_smol_docling

Signed-off-by: Maksym Lysak <mly@zurich.ibm.com>
This commit is contained in:
Maksym Lysak 2025-02-24 14:39:18 +01:00
parent 1dbedcbb4e
commit a7a1f32b10

View File

@ -64,8 +64,10 @@ for source in sources:
print("")
print(res.document.export_to_markdown())
# with (out_path / f"{res.input.file.stem}.html").open("w") as fp:
# fp.write(res.document.export_to_html())
for page in res.pages:
print("")
print("Predicted page in DOCTAGS:")
print(page.predictions.doctags.tag_string)
res.document.save_as_html(
filename=Path("{}/{}.html".format(out_path, res.input.file.stem)),