Azure Document Intelligence "code": "ModelNotFound",
Vincent Primiani
0
Reputation points
I'm getting the below error ;
ResourceNotFoundError: (NotFound) Resource not found. Code: NotFound Message: Resource not found. Inner error: { "code": "ModelNotFound", "message": "The requested model was not found." }
running this code
import os
from azure.core.credentials import AzureKeyCredential
from azure.ai.documentintelligence import DocumentIntelligenceClient
# Replace with your actual endpoint and key
endpoint = "https://xxx.cognitiveservices.azure.com"
key = ""
# Initialize the client with the preview API version
document_intelligence_client = DocumentIntelligenceClient(endpoint=endpoint, credential=AzureKeyCredential(key), api_version="2024-02-29-preview")
# Path to the sample document (PDF, image, etc.)
path_to_sample_document = "/content/overpay uhc-04042024125510.pdf"
# Replace "custom-model-id" with your actual custom model ID
custom_model_id = "type-classification-V1.1"
# Analyze the document using your custom model
with open(path_to_sample_document, "rb") as f:
poller = document_intelligence_client.begin_analyze_document(custom_model_id, analyze_request=f, content_type="application/octet-stream")
result = poller.result()
1 answer
Sort by: Most helpful
-
Deleted
This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.
Comments have been turned off. Learn more