Update main.py
Browse files
main.py
CHANGED
@@ -15,8 +15,8 @@ def read_image_from_stream(image_data, subscription_key, endpoint):
|
|
15 |
'Ocp-Apim-Subscription-Key': subscription_key,
|
16 |
'Content-Type': 'application/octet-stream'
|
17 |
}
|
18 |
-
|
19 |
-
response = requests.post(f"{endpoint}/vision/v3.2/read/analyze", headers=headers, data=
|
20 |
|
21 |
if response.status_code == 202:
|
22 |
read_response_headers = response.headers
|
|
|
15 |
'Ocp-Apim-Subscription-Key': subscription_key,
|
16 |
'Content-Type': 'application/octet-stream'
|
17 |
}
|
18 |
+
img = image_data.read()
|
19 |
+
response = requests.post(f"{endpoint}/vision/v3.2/read/analyze", headers=headers, data=img)
|
20 |
|
21 |
if response.status_code == 202:
|
22 |
read_response_headers = response.headers
|