guanshuicheng / invoice

Collaboration with wangxupeng(https://github.com/wangxupeng)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

API調用

maxkaoppp opened this issue · comments

請問一下 要怎麼POST照片

import requests
resp = requests.post("http://127.0.0.1:11111/invoice-ocr", files={"file": open("test.jpg", 'rb')})
resp.content.decode()

# '{"FileName":"test.jpg","code":100,"data":{"发票代码":"144001809010","发票号码":"00000001","校验码":":00000"," 税后价格":"¥106.60"},"message":"识别成功","ocrIdentifyTime":"2021-04-20 16:56:50"}\n'

作者有附图说明使用方法:
使用方法