将ocr加载到gpu1上
This commit is contained in:
21
test.py
21
test.py
@@ -1,21 +0,0 @@
|
||||
from paddlenlp import Taskflow
|
||||
|
||||
SCHEMA = ["患者姓名", "入院日期", "出院日期", "费用总额", "个人现金支付", "个人账户支付", "自费金额", "医保类型",
|
||||
"住院号", "医保结算单号码"]
|
||||
|
||||
IE = Taskflow("information_extraction", schema=SCHEMA, model="uie-x-base",
|
||||
task_path="config/model/settlement_list_model", layout_analysis=True)
|
||||
|
||||
|
||||
def main():
|
||||
i = 0
|
||||
try:
|
||||
while 1:
|
||||
IE({"doc": "visual_model_test/img/PH20240511000638_1_094306_1.jpg"})
|
||||
i += 1
|
||||
except Exception:
|
||||
print(i)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
Reference in New Issue
Block a user