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.
Thank you already a lot in advance!