From a7a1f32b107f4fd48b0ab89aad2e42f03997113a Mon Sep 17 00:00:00 2001 From: Maksym Lysak Date: Mon, 24 Feb 2025 14:39:18 +0100 Subject: [PATCH] Added example on how to get original predicted doctags in minimal_smol_docling Signed-off-by: Maksym Lysak --- docs/examples/minimal_smol_docling.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/examples/minimal_smol_docling.py b/docs/examples/minimal_smol_docling.py index 66252f7b..cb51f7f3 100644 --- a/docs/examples/minimal_smol_docling.py +++ b/docs/examples/minimal_smol_docling.py @@ -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)),