我正在使用Python输入base64字符串,并使用Azure Computer Vision API对其进行分析。如何格式化base64字符串以将其接受为流文件?
这是传递字符串的地方:
recognize_printed_results = computervision_client.batch_read_file_in_stream(ImageReqBody['Stream'], raw=True)
这是我得到的错误:
Exception: AttributeError: 'str' object has no attribute 'read'
ImageReqBody 是我用来输入图像字符串的Json对象。
batch_read_file_in_stream()
函数可以接受的格式是什么?