添加版面分析

This commit is contained in:
2024-06-05 16:57:04 +08:00
parent fbd6834dd5
commit 5498d62542

View File

@@ -28,7 +28,8 @@ def information_extraction(schema, phrecs, task_path):
for phrec in phrecs:
pic_path = get_private_url(phrec.cfjaddress)
if pic_path:
ie = Taskflow("information_extraction", schema=schema, model="uie-x-base", task_path=task_path)
ie = Taskflow("information_extraction", schema=schema, model="uie-x-base", task_path=task_path,
layout_analysis=True)
# 批量抽取写法:(ie([{"doc": "./data/6.jpg"}, {"doc": "./data/7.jpg"}])
result = ie({"doc": pic_path})