Skip to content

Commit 43887e6

Browse files
quedcragwolfe
andauthored
chore: remove tqdm output (#73)
Removes progress bar output while processing pdfs and image elements. Co-authored-by: cragwolfe <[email protected]>
1 parent a501616 commit 43887e6

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.2.14
2+
3+
* Suppressed processing progress bars
4+
15
## 0.2.13
26

37
* Add table processing
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "0.2.13" # pragma: no cover
1+
__version__ = "0.2.14" # pragma: no cover

unstructured_inference/inference/layout.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
import os
33
import re
44
import tempfile
5-
from tqdm import tqdm
65
from typing import List, Optional, Tuple, Union, BinaryIO
76
import unicodedata
87

@@ -157,13 +156,12 @@ def get_elements_from_layout(self, layout: List[TextRegion]) -> List[LayoutEleme
157156
# NOTE(robinson) - This orders the page from top to bottom. We'll need more
158157
# sophisticated ordering logic for more complicated layouts.
159158
layout.sort(key=lambda element: element.y1)
160-
elements = []
161-
for e in tqdm(layout):
162-
elements.append(
163-
get_element_from_block(
164-
e, self.image, self.layout, self.ocr_strategy, self.extract_tables
165-
)
159+
elements = [
160+
get_element_from_block(
161+
e, self.image, self.layout, self.ocr_strategy, self.extract_tables
166162
)
163+
for e in layout
164+
]
167165
return elements
168166

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

0 commit comments

Comments
 (0)