Skip to content

Commit

Permalink
repair bug from save2json
Browse files Browse the repository at this point in the history
  • Loading branch information
liuhongen1234567 authored and TingquanGao committed Nov 28, 2024
1 parent 50d1b81 commit 364e0a5
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 6 deletions.
4 changes: 0 additions & 4 deletions paddlex/inference/results/chat_ocr.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,6 @@ def save_to_json(self, save_path):
layout_save_path = f"{save_path}_layout.jpg"
ocr_save_path = f"{save_path}_ocr.jpg"
table_save_path = f"{save_path}_table"
self["input_path"] = layout_save_path
self["layout_result"]["input_path"] = layout_save_path
self["layout_parsing_result"]["input_path"] = layout_save_path
self["ocr_result"]["input_path"] = ocr_save_path
table_result_num = len(self["table_result"])
for idx in range(table_result_num):
self["table_result"][idx]["input_path"] = "{}_{:04d}".format(
Expand Down
2 changes: 0 additions & 2 deletions paddlex/inference/results/formula_rec.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,6 @@ def save_to_json(self, save_path):
save_path = Path(save_path).stem

formula_save_path = f"{save_path}_formula.jpg"
self["input_path"] = formula_save_path
self["layout_result"]["input_path"] = formula_save_path
if not str(save_path).endswith(".json"):
save_path = "{}.json".format(save_path)
super().save_to_json(save_path)
Expand Down

0 comments on commit 364e0a5

Please # to comment.