Код: Выделить всё
# import libraries
import os
from azure.core.credentials import AzureKeyCredential
from azure.ai.documentintelligence import DocumentIntelligenceClient
from azure.ai.documentintelligence.models import AnalyzeResult
from azure.ai.documentintelligence.models import AnalyzeDocumentRequest
import base64
def analyze_layout():
document_intelligence_client = DocumentIntelligenceClient(
endpoint="https://.cognitiveservices.azure.com/",
credential=AzureKeyCredential("EHCGTC....")
)
with open("C:/Users/lvg/source/repos/terraform-ai-iac/terraform-ai-iac/data/documents/test.pdf", "rb") as document:
poller = document_intelligence_client.begin_analyze_document("prebuilt-layout", document)
result: AnalyzeResult = poller.result()
analyze_layout()
Код: Выделить всё
azure.core.exceptions.ResourceNotFoundError: (404) Resource not found
Code: 404
Message: Resource not found
Что может быть причина, по которой мой код не работает?
Подробнее здесь: https://stackoverflow.com/questions/793 ... thod-error
Мобильная версия