文字识别接口用不了了
Ta的回复 :client = AipOcr(APP_ID, API_KEY, SECRET_KEY) filetest = 'Q.jpg' def get_file_content(filePath): with open(filePath,'rb') as fp: return fp.read() image = get_file_content(filetest) r = client.tableRecognitionAsync(image); requestId =r['result'][0]['request_id'] options = {} options["result_type"] = 'json' rs = client.getTableRecognitionResult(requestId,options); print(requestId) print(resu) print(rs)