Skip to content

Commit

Permalink
Fix styling
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 fb2c2da commit 7fe48fb
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions deepsearch_glm/utils/doc_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,7 @@ def to_docling_document(doc_glm, update_name_label=False) -> DoclingDocument:
)
doc_name = Path(origin.filename).stem

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

if "properties" in doc_glm:
props = pd.DataFrame(
Expand Down Expand Up @@ -310,7 +308,7 @@ def to_legacy_document_format(doc_glm, doc_leg={}, update_name_label=False):
extra_mappings = {}
for v in reverse_label_mapping.values():
extra_mappings[v] = v
#extra_mappings[v.lower()] = v
# extra_mappings[v.lower()] = v
reverse_label_mapping = {**reverse_label_mapping, **extra_mappings}

layout_label_to_ds_type = {
Expand All @@ -333,11 +331,10 @@ def to_legacy_document_format(doc_glm, doc_leg={}, update_name_label=False):
}
extra_mappings = {}
for v in layout_label_to_ds_type.values():
#extra_mappings[v[:1].upper() + v[1:]] = v # capitalize
# extra_mappings[v[:1].upper() + v[1:]] = v # capitalize
extra_mappings[v] = v
layout_label_to_ds_type = {**layout_label_to_ds_type, **extra_mappings}


doc_leg["main-text"] = []
doc_leg["figures"] = []
doc_leg["tables"] = []
Expand Down

0 comments on commit 7fe48fb

Please sign in to comment.