Skip to content

Commit cb8c966

Browse files
committed
ready to review
1 parent 410a19f commit cb8c966

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 1.0.8-dev0
2+
3+
* Enhancement: Optimized `outputs_to_objects` (codeflash)
4+
15
## 1.0.7
26

37
* Fix a hardcoded file extension causing confusion in the logs
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "1.0.7" # pragma: no cover
1+
__version__ = "1.0.8-dev0" # pragma: no cover

unstructured_inference/models/tables.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,11 +227,10 @@ def outputs_to_objects(
227227
pred_bboxes = rescaled.tolist()
228228

229229
objects = []
230-
append = objects.append
231230
for label, score, bbox in zip(pred_labels, pred_scores, pred_bboxes):
232231
class_label = class_idx2name[int(label)]
233232
if class_label != "no object":
234-
append(
233+
objects.append(
235234
{
236235
"label": class_label,
237236
"score": float(score),

0 commit comments

Comments
 (0)