Skip to content

Commit

Permalink
fix: bump inference again to fix bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
badGarnet committed Oct 18, 2024
1 parent 8c54153 commit 8b6b959
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ click==8.1.7
# via
# nltk
# python-oxmsg
cryptography==43.0.1
cryptography==43.0.3
# via unstructured-client
dataclasses-json==0.6.7
# via -r ./base.in
Expand Down
2 changes: 1 addition & 1 deletion requirements/extra-pdf-image.in
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ google-cloud-vision
effdet
# Do not move to constraints.in, otherwise unstructured-inference will not be upgraded
# when unstructured library is.
unstructured-inference==0.7.41
unstructured-inference==0.8.0
unstructured.pytesseract>=0.3.12
6 changes: 3 additions & 3 deletions requirements/extra-pdf-image.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ coloredlogs==15.0.1
# via onnxruntime
contourpy==1.3.0
# via matplotlib
cryptography==43.0.1
cryptography==43.0.3
# via
# -c ./base.txt
# pdfminer-six
Expand Down Expand Up @@ -93,7 +93,7 @@ lxml==5.3.0
# via
# -c ./base.txt
# pikepdf
markupsafe==3.0.1
markupsafe==3.0.2
# via jinja2
matplotlib==3.9.2
# via
Expand Down Expand Up @@ -284,7 +284,7 @@ typing-extensions==4.12.2
# torch
tzdata==2024.2
# via pandas
unstructured-inference==0.7.41
unstructured-inference==0.8.0
# via -r ./extra-pdf-image.in
unstructured-pytesseract==0.3.13
# via -r ./extra-pdf-image.in
Expand Down
2 changes: 1 addition & 1 deletion requirements/huggingface.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ langdetect==1.0.9
# via
# -c ./base.txt
# -r ./huggingface.in
markupsafe==3.0.1
markupsafe==3.0.2
# via jinja2
mpmath==1.3.0
# via sympy
Expand Down
2 changes: 1 addition & 1 deletion requirements/test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ wrapt==1.16.0
# vcrpy
xmljson==0.2.1
# via label-studio-sdk
yarl==1.15.4
yarl==1.15.5
# via vcrpy

# The following packages are considered to be unsafe in a requirements file:
Expand Down
2 changes: 1 addition & 1 deletion unstructured/partition/pdf_image/inference_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def merge_text_regions(regions: TextRegions) -> TextRegion:
max_x2 = regions.x2.max().astype(float)
max_y2 = regions.y2.max().astype(float)

merged_text = " ".join(regions.texts)
merged_text = " ".join([text for text in regions.texts if text])
source = regions.source

return TextRegion.from_coords(min_x1, min_y1, max_x2, max_y2, merged_text, source)

0 comments on commit 8b6b959

Please sign in to comment.