Refactor:naive_merge_with_images close useless images (#9296)
### What problem does this PR solve? naive_merge_with_images close useless images ### Type of change - [x] Refactoring
This commit is contained in:
parent
f0c34d4454
commit
0a0bfc02a0
1 changed files with 4 additions and 0 deletions
|
|
@ -612,6 +612,10 @@ def naive_merge_with_images(texts, images, chunk_token_num=128, delimiter="\n。
|
||||||
continue
|
continue
|
||||||
add_chunk(sub_sec, image)
|
add_chunk(sub_sec, image)
|
||||||
|
|
||||||
|
for img in images:
|
||||||
|
if isinstance(img, Image.Image):
|
||||||
|
img.close()
|
||||||
|
|
||||||
return cks, result_images
|
return cks, result_images
|
||||||
|
|
||||||
def docx_question_level(p, bull=-1):
|
def docx_question_level(p, bull=-1):
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue