Skip to content

Commit

Permalink
表格文字识别、条形码/二维码识别、身份证混贴识别、手写文字识别支持function call 简化OCR识别内容
Browse files Browse the repository at this point in the history
  • Loading branch information
sucuicong committed Mar 8, 2024
1 parent 48e1e18 commit 208266e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion appbuilder/core/components/qrcode_ocr/component.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ def tool_eval(self, name: str, streaming: bool, **kwargs):
raise InvalidRequestArgumentError("location must be a string with value 'true' or 'false'")
req.location = location
resp = self._recognize(req)
result[file_name] = [item["text"] for item in proto.Message.to_dict(resp)["codes_result"]]
result[file_name] = [item["text"] for item in proto.Message.to_dict(resp).get("codes_result", [])]
if streaming:
yield json.dumps(result, ensure_ascii=False)
else:
Expand Down

0 comments on commit 208266e

Please sign in to comment.