python与百度人工智能-图片识别
工智能接口 百度AI需要安装这个模块pip install baidu-aip导入模块from aip import AipOcr百度ai人工智能,图片识别文字接口App_ID=" "API_Key=" "Secret_Key=" "接口给对象clinetclinet=AipOcr(App_ID,API_Key,Secret_Key)image_path=‘本地文件路径’with open(ima
·
人工智能接口 百度AI
需要安装这个模块
pip install baidu-aip
导入模块
from aip import AipOcr
百度AI人工智能,图片识别文字接口
App_ID=" "
API_Key=" "
Secret_Key=" "
接口给对象clinet
clinet=AipOcr(App_ID,API_Key,Secret_Key)
image_path=‘本地文件路径’
with open(image_path,"rb") as f:
image=f.read()
获取接口 basic General 基本通用 replace 替换、取代 空格替换为非空格
data=clinet.basicGeneral(image).replace(" “,”")
data=clinet.basicGeneral(image)
获取的数据类型为字典
print(data)
更多推荐



所有评论(0)