5m4ck3r commited on
Commit
d0dd26e
1 Parent(s): 10f6029

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +2 -2
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=image_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