我正在尝试使用一种浅蓝的认知服务,这给我带来了一个错误:
"ValueError:由于流不可读/不可查找,无法自动检测内容类型。请传递content_type关键字参数。“
我的代码如下:
from azure.core.credentials import AzureKeyCredential
from azure.ai.formrecognizer import FormRecognizerClient
endpoint = "https://example.cognitiveservices.azure.com/"
key = "xxxxxxxxxxxxxxxxxxx820"
read_image_url = 'https://storage-example.blob.core.windows.net/ocr-demo/inputs/IMG_1618.jpg?sp=r&st=2022-06-30xxxxxx31Z&se=2023-0xxxxxx:31Z&spr=https&sv=xxxxx08&sr=b&sig=6xxxxxxxx'
form_recognizer_client = FormRecognizerClient(
endpoint=endpoint, credential=AzureKeyCredential(key)
)
我不明白为什么这会返回我,因为我直接从服务和图像授予密钥。
你能给我一点线索吗?我的问题是什么?
提前谢谢。
致以问候。
发布于 2022-07-08 07:11:20
为了利用认知服务从blob存储中调用图像,我们可以实现认知搜索程序。我们需要实现BlobIndexer.,默认情况下,我们看不到索引器在上的实现。但是所有的图像都将嵌入到.MSG文件中,并提取文件中的附件。
该提取将返回normalized_images字段。即使blob包含图像,这也将被忽略,直到我们执行AI富集。
像下面的图像中提到的那样导入data wizard
。
从签出完整的过程
https://stackoverflow.com/questions/72862875
复制相似问题