Skip to content

Commit

Permalink
Remove DescriptionItem, pin docling-core 2.0.0
Browse files Browse the repository at this point in the history
Signed-off-by: Christoph Auer <[email protected]>
  • Loading branch information
cau-git committed Oct 16, 2024
1 parent f219bbf commit be1004e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
10 changes: 4 additions & 6 deletions deepsearch_glm/utils/doc_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,9 @@
from docling_core.types.doc import (
BoundingBox,
CoordOrigin,
DescriptionItem,
DocItemLabel,
DoclingDocument,
DocumentOrigin,
PageItem,
ProvenanceItem,
Size,
TableCell,
Expand Down Expand Up @@ -76,7 +74,7 @@ def to_docling_document(doc_glm, update_name_label=False) -> DoclingDocument:
doc_name = Path(origin.filename).stem

doc: DoclingDocument = DoclingDocument(
name=doc_name, description=DescriptionItem(), origin=origin
name=doc_name, origin=origin
)

if "properties" in doc_glm:
Expand Down Expand Up @@ -308,9 +306,9 @@ def to_legacy_document_format(doc_glm, doc_leg={}, update_name_label=False):
DocItemLabel.PARAGRAPH.value: "paragraph",
}

for v in reverse_label_mapping.values():
reverse_label_mapping[v] = v
reverse_label_mapping[v.lower()] = v
# for v in reverse_label_mapping.values():
# reverse_label_mapping[v] = v
# reverse_label_mapping[v.lower()] = v

doc_leg["main-text"] = []
doc_leg["figures"] = []
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ build = "build.py"

[tool.poetry.dependencies]
python = "^3.9"
docling-core = {git = "https://github.com/DS4SD/docling-core.git", rev = "002f784745bf2e2bcf9def81d070c59f2e7c61c2"}
docling-core = "^2.0"
deepsearch-toolkit = { version = ">=0.31.0", optional = true }
tabulate = ">=0.8.9"
numpy = [
Expand Down

0 comments on commit be1004e

Please sign in to comment.