Skip to content

Commit

Permalink
chore: remove tqdm output (#73)
Browse files Browse the repository at this point in the history
Removes progress bar output while processing pdfs and image elements.

Co-authored-by: cragwolfe <[email protected]>
  • Loading branch information
qued and cragwolfe authored Mar 29, 2023
1 parent a501616 commit 43887e6
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.2.14

* Suppressed processing progress bars

## 0.2.13

* Add table processing
Expand Down
2 changes: 1 addition & 1 deletion unstructured_inference/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.2.13" # pragma: no cover
__version__ = "0.2.14" # pragma: no cover
12 changes: 5 additions & 7 deletions unstructured_inference/inference/layout.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import os
import re
import tempfile
from tqdm import tqdm
from typing import List, Optional, Tuple, Union, BinaryIO
import unicodedata

Expand Down Expand Up @@ -157,13 +156,12 @@ def get_elements_from_layout(self, layout: List[TextRegion]) -> List[LayoutEleme
# NOTE(robinson) - This orders the page from top to bottom. We'll need more
# sophisticated ordering logic for more complicated layouts.
layout.sort(key=lambda element: element.y1)
elements = []
for e in tqdm(layout):
elements.append(
get_element_from_block(
e, self.image, self.layout, self.ocr_strategy, self.extract_tables
)
elements = [
get_element_from_block(
e, self.image, self.layout, self.ocr_strategy, self.extract_tables
)
for e in layout
]
return elements

def _get_image_array(self) -> Union[np.ndarray, None]:
Expand Down

0 comments on commit 43887e6

Please sign in to comment.