API調用
maxkaoppp opened this issue · comments
paulgg6378 commented
請問一下 要怎麼POST照片
January Desk commented
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'
王帅 commented