Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions docs/examples/suryaocr_with_custom_models.py
Original file line number Diff line number Diff line change
@@ -1,27 +1,36 @@
# 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
Expand Down
1 change: 0 additions & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading