This commit is contained in:
2024-06-21 09:02:27 +08:00
parent 3f8e2b5e61
commit 738642f932

View File

@@ -97,11 +97,12 @@ def information_extraction(ie, phrecs):
for phrec in phrecs:
pic_path = ucloud.get_private_url(phrec.cfjaddress)
if pic_path:
pdb.set_trace()
split_result = split_image(pic_path)
for img in split_result:
with tempfile.NamedTemporaryFile(delete=False, suffix=".jpg") as temp_file:
img["img"].save(temp_file.name)
pdb.set_trace()
docs.append({"doc": temp_file.name})
doc_phrecs.append({"phrec": phrec, "x_offset": img["x_offset"], "y_offset": img["y_offset"]})
if not docs: