4 Commits

Author SHA1 Message Date
github-actions[bot]
b6eece7ef0 chore: bump version to 1.7.0 [skip ci] 2025-10-17 12:16:37 +00:00
Michele Dolfi
f5af71e8f6 feat(UI): add auto and orcmac options in demo UI (#408)
Signed-off-by: Michele Dolfi <dol@zurich.ibm.com>
2025-10-17 12:23:57 +02:00
Michele Dolfi
d95ea94087 feat: Docling with auto-ocr (#403)
Signed-off-by: Michele Dolfi <dol@zurich.ibm.com>
2025-10-15 21:15:29 +02:00
sahlex
5344505718 fix: run docling ui behind a reverse proxy using a context path (#396)
Signed-off-by: Sahler.Alexander <Alexander.Sahler@m-net.de>
Signed-off-by: sahlex <1122279+sahlex@users.noreply.github.com>
Co-authored-by: Sahler.Alexander <Alexander.Sahler@m-net.de>
2025-10-09 16:07:02 +02:00
6 changed files with 1808 additions and 1327 deletions

View File

@@ -1,3 +1,23 @@
## [v1.7.0](https://github.com/docling-project/docling-serve/releases/tag/v1.7.0) - 2025-10-17
### Feature
* **UI:** Add auto and orcmac options in demo UI ([#408](https://github.com/docling-project/docling-serve/issues/408)) ([`f5af71e`](https://github.com/docling-project/docling-serve/commit/f5af71e8f6de00d7dd702471a3eea2e94d882410))
* Docling with auto-ocr ([#403](https://github.com/docling-project/docling-serve/issues/403)) ([`d95ea94`](https://github.com/docling-project/docling-serve/commit/d95ea940870af0d8df689061baa50f6026efce28))
### Fix
* Run docling ui behind a reverse proxy using a context path ([#396](https://github.com/docling-project/docling-serve/issues/396)) ([`5344505`](https://github.com/docling-project/docling-serve/commit/53445057184aa731ee7456b33b70bc0ecf82f2a6))
### Docling libraries included in this release:
- docling 2.57.0
- docling-core 2.48.4
- docling-ibm-models 3.9.1
- docling-jobkit 1.6.0
- docling-mcp 1.3.2
- docling-parse 4.5.0
- docling-serve 1.7.0
## [v1.6.0](https://github.com/docling-project/docling-serve/releases/tag/v1.6.0) - 2025-10-03 ## [v1.6.0](https://github.com/docling-project/docling-serve/releases/tag/v1.6.0) - 2025-10-03
### Feature ### Feature

View File

@@ -58,7 +58,7 @@ RUN --mount=from=uv_stage,source=/uv,target=/bin/uv \
uv sync ${UV_SYNC_ARGS} ${UV_SYNC_EXTRA_ARGS} --no-extra flash-attn && \ uv sync ${UV_SYNC_ARGS} ${UV_SYNC_EXTRA_ARGS} --no-extra flash-attn && \
FLASH_ATTENTION_SKIP_CUDA_BUILD=TRUE uv sync ${UV_SYNC_ARGS} ${UV_SYNC_EXTRA_ARGS} --no-build-isolation-package=flash-attn FLASH_ATTENTION_SKIP_CUDA_BUILD=TRUE uv sync ${UV_SYNC_ARGS} ${UV_SYNC_EXTRA_ARGS} --no-build-isolation-package=flash-attn
ARG MODELS_LIST="layout tableformer picture_classifier easyocr" ARG MODELS_LIST="layout tableformer picture_classifier rapidocr easyocr"
RUN echo "Downloading models..." && \ RUN echo "Downloading models..." && \
HF_HUB_DOWNLOAD_TIMEOUT="90" \ HF_HUB_DOWNLOAD_TIMEOUT="90" \

View File

@@ -194,16 +194,25 @@ def create_app(): # noqa: C901
import gradio as gr import gradio as gr
from docling_serve.gradio_ui import ui as gradio_ui from docling_serve.gradio_ui import ui as gradio_ui
from docling_serve.settings import uvicorn_settings
tmp_output_dir = get_scratch() / "gradio" tmp_output_dir = get_scratch() / "gradio"
tmp_output_dir.mkdir(exist_ok=True, parents=True) tmp_output_dir.mkdir(exist_ok=True, parents=True)
gradio_ui.gradio_output_dir = tmp_output_dir gradio_ui.gradio_output_dir = tmp_output_dir
# Build the root_path for Gradio, accounting for UVICORN_ROOT_PATH
gradio_root_path = (
f"{uvicorn_settings.root_path}/ui"
if uvicorn_settings.root_path
else "/ui"
)
app = gr.mount_gradio_app( app = gr.mount_gradio_app(
app, app,
gradio_ui, gradio_ui,
path="/ui", path="/ui",
allowed_paths=["./logo.png", tmp_output_dir], allowed_paths=["./logo.png", tmp_output_dir],
root_path="/ui", root_path=gradio_root_path,
) )
except ImportError: except ImportError:
_log.warning( _log.warning(

View File

@@ -4,6 +4,7 @@ import itertools
import json import json
import logging import logging
import ssl import ssl
import sys
import tempfile import tempfile
import time import time
from pathlib import Path from pathlib import Path
@@ -224,13 +225,17 @@ def auto_set_return_as_file(
def change_ocr_lang(ocr_engine): def change_ocr_lang(ocr_engine):
if ocr_engine == "easyocr": if ocr_engine == "easyocr":
return "en,fr,de,es" return gr.update(visible=True, value="en,fr,de,es")
elif ocr_engine == "tesseract_cli": elif ocr_engine == "tesseract_cli":
return "eng,fra,deu,spa" return gr.update(visible=True, value="eng,fra,deu,spa")
elif ocr_engine == "tesseract": elif ocr_engine == "tesseract":
return "eng,fra,deu,spa" return gr.update(visible=True, value="eng,fra,deu,spa")
elif ocr_engine == "rapidocr": elif ocr_engine == "rapidocr":
return "english,chinese" return gr.update(visible=True, value="english,chinese")
elif ocr_engine == "ocrmac":
return gr.update(visible=True, value="fr-FR,de-DE,es-ES,en-US")
return gr.update(visible=False, value="")
def wait_task_finish(auth: str, task_id: str, return_as_file: bool): def wait_task_finish(auth: str, task_id: str, return_as_file: bool):
@@ -636,18 +641,25 @@ with gr.Blocks(
ocr = gr.Checkbox(label="Enable OCR", value=True) ocr = gr.Checkbox(label="Enable OCR", value=True)
force_ocr = gr.Checkbox(label="Force OCR", value=False) force_ocr = gr.Checkbox(label="Force OCR", value=False)
with gr.Column(scale=1): with gr.Column(scale=1):
ocr_engine = gr.Radio( engines_list = [
[ ("Auto", "auto"),
("EasyOCR", "easyocr"), ("EasyOCR", "easyocr"),
("Tesseract", "tesseract"), ("Tesseract", "tesseract"),
("RapidOCR", "rapidocr"), ("RapidOCR", "rapidocr"),
], ]
if sys.platform == "darwin":
engines_list.append(("OCRMac", "ocrmac"))
ocr_engine = gr.Radio(
engines_list,
label="OCR Engine", label="OCR Engine",
value="easyocr", value="auto",
) )
with gr.Column(scale=1, min_width=200): with gr.Column(scale=1, min_width=200):
ocr_lang = gr.Textbox( ocr_lang = gr.Textbox(
label="OCR Language (beware of the format)", value="en,fr,de,es" label="OCR Language (beware of the format)",
value="en,fr,de,es",
visible=False,
) )
ocr_engine.change(change_ocr_lang, inputs=[ocr_engine], outputs=[ocr_lang]) ocr_engine.change(change_ocr_lang, inputs=[ocr_engine], outputs=[ocr_lang])
with gr.Row(): with gr.Row():

View File

@@ -1,6 +1,6 @@
[project] [project]
name = "docling-serve" name = "docling-serve"
version = "1.6.0" # DO NOT EDIT, updated automatically version = "1.7.0" # DO NOT EDIT, updated automatically
description = "Running Docling as a service" description = "Running Docling as a service"
license = {text = "MIT"} license = {text = "MIT"}
authors = [ authors = [
@@ -55,10 +55,12 @@ ui = [
tesserocr = [ tesserocr = [
"tesserocr~=2.7" "tesserocr~=2.7"
] ]
easyocr = [
"easyocr>=1.7",
]
rapidocr = [ rapidocr = [
"rapidocr (>=3.3,<4.0.0) ; python_version < '3.14'", "rapidocr (>=3.3,<4.0.0) ; python_version < '3.14'",
"onnxruntime (>=1.7.0,<2.0.0)", "onnxruntime (>=1.7.0,<2.0.0)",
"modelscope>=1.29.0",
] ]
flash-attn = [ flash-attn = [
"flash-attn~=2.8.2; sys_platform == 'linux' and platform_machine == 'x86_64'" "flash-attn~=2.8.2; sys_platform == 'linux' and platform_machine == 'x86_64'"

3062
uv.lock generated

File diff suppressed because one or more lines are too long