Permission Denied fpr Microsoft Cmputer vision with ocrrect credentials

A. Nohl 0 Reputation points
2024-06-17T16:26:24.6966667+00:00

I am trying to access the Computer Vision model over the Student Azure subscription. I checked the Credentials so the subscription key and the endpoint should be correct, I copied them out of the keys and endpoint tab.
I call the client like this and access the data:

client = ComputerVisionClient(endpoint, CognitiveServicesCredentials(subscription_key))
response = client.read_in_stream(io.BytesIO(image), raw=True)
def analyze_images(images):
    results = []
    for image in images:
        response = client.read_in_stream(io.BytesIO(image), raw=True)
        operation_location = response.headers["Operation-Location"]
        operation_id = operation_location.split("/")[-1]

        # Wait for the operation to complete
        while True:
            result = client.get_read_result(operation_id)
            if result.status.lower() not in ["notstarted", "running"]:
                break
            time.sleep(1)

        if result.status == OperationStatusCodes.succeeded:
            results.append(result.analyze_result.read_results)
    return results
response = client.read_in_stream(io.BytesIO(image), raw=True)

I use the F0 pricing where OCR should be included and i am also owner of the project.User's imageUser's image

Thank you already a lot in advance!

Azure Computer Vision
Azure Computer Vision
An Azure artificial intelligence service that analyzes content in images and video.
338 questions
{count} votes