From 1e9e2e7fab20d465f1ef171250036dda29af36ad Mon Sep 17 00:00:00 2001 From: Taru Garg Date: Sat, 25 Jul 2026 00:17:17 +0530 Subject: [PATCH 1/2] docs: Cleanup removed examples from nav and fix example doc generation Signed-off-by: Taru Garg --- docs/examples/suryaocr_with_custom_models.py | 14 +++++++++++--- mkdocs.yml | 1 - 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/docs/examples/suryaocr_with_custom_models.py b/docs/examples/suryaocr_with_custom_models.py index 15574f1588..8d1919edb0 100644 --- a/docs/examples/suryaocr_with_custom_models.py +++ b/docs/examples/suryaocr_with_custom_models.py @@ -1,27 +1,35 @@ -# Example: Integrating SuryaOCR with Docling for PDF OCR and Markdown Export +# %% [markdown] +# Integrating SuryaOCR with Docling for PDF OCR and Markdown Export # # Overview: +# # - Configures SuryaOCR options for OCR. # - Executes PDF pipeline with SuryaOCR integration. # - Models auto-download from Hugging Face on first run. # # Prerequisites: +# # - Install: `pip install docling-surya` # - Ensure `docling` imports successfully. # # Execution: +# # - Run from repo root: `python docs/examples/suryaocr_with_custom_models.py` # - Outputs Markdown to stdout. # # Notes: +# # - Default source: EPA PDF URL; substitute with local path as needed. # - Models cached in `~/.cache/huggingface`; override with HF_HOME env var. # - Use proxy config for restricted networks. # - **Important Licensing Note**: The `docling-surya` package integrates SuryaOCR, which is licensed under the GNU General Public License (GPL). -# Using this integration may impose GPL obligations on your project. Review the license terms carefully. +# - Using this integration may impose GPL obligations on your project. Review the license terms carefully. # Requires `pip install docling-surya` -# See https://pypi.org/project/docling-surya/ +# See [https://pypi.org/project/docling-surya/](https://pypi.org/project/docling-surya/) + +# %% + from docling_surya import SuryaOcrOptions from docling.datamodel.base_models import InputFormat diff --git a/mkdocs.yml b/mkdocs.yml index a65fa4737c..89785f107a 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -108,7 +108,6 @@ nav: - _generated/examples/video_pipeline.md - "Figure export": _generated/examples/export_figures.md - "Table export": _generated/examples/export_tables.md - - "Multimodal export": _generated/examples/export_multimodal.md - "Force full page OCR": _generated/examples/full_page_ocr.md - "Automatic OCR language detection with tesseract": _generated/examples/tesseract_lang_detection.md - "RapidOCR with custom OCR models": _generated/examples/rapidocr_with_custom_models.md From add14d608e046fbbab54d1ae967e30d5a2aa2bdf Mon Sep 17 00:00:00 2001 From: Taru Garg Date: Sat, 25 Jul 2026 00:23:31 +0530 Subject: [PATCH 2/2] remove line from under notes list Signed-off-by: Taru Garg --- docs/examples/suryaocr_with_custom_models.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/examples/suryaocr_with_custom_models.py b/docs/examples/suryaocr_with_custom_models.py index 8d1919edb0..03320ff6bf 100644 --- a/docs/examples/suryaocr_with_custom_models.py +++ b/docs/examples/suryaocr_with_custom_models.py @@ -23,7 +23,8 @@ # - Models cached in `~/.cache/huggingface`; override with HF_HOME env var. # - Use proxy config for restricted networks. # - **Important Licensing Note**: The `docling-surya` package integrates SuryaOCR, which is licensed under the GNU General Public License (GPL). -# - Using this integration may impose GPL obligations on your project. Review the license terms carefully. +# +# Using this integration may impose GPL obligations on your project. Review the license terms carefully. # Requires `pip install docling-surya` # See [https://pypi.org/project/docling-surya/](https://pypi.org/project/docling-surya/)