deepstack: pass api key in request (#6579)

The POST data was prepared, but not passed into the request call.
This commit is contained in:
Martin Weinelt 2023-05-24 00:32:08 +02:00 committed by GitHub
parent f66ccb04f6
commit 1e17dbaa91
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -50,7 +50,10 @@ class DeepStack(DetectionApi):
image_bytes = output.getvalue()
data = {"api_key": self.api_key}
response = requests.post(
self.api_url, files={"image": image_bytes}, timeout=self.api_timeout
self.api_url,
data=data,
files={"image": image_bytes},
timeout=self.api_timeout,
)
response_json = response.json()
detections = np.zeros((20, 6), np.float32)