Skip to content

Commit 7cb43fa

Browse files
committed
with_probabilities support
1 parent 10ab3c0 commit 7cb43fa

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ def readme():
88
return f.read()
99

1010
setuptools.setup(name='unmand',
11-
version='2.1.0',
11+
version='2.1.1',
1212
description='Helper library for consuming the Unmand API',
1313
url='https://github.com/unmand-systems/unmand-python',
1414
author='Josiah Khor',

src/unmand/__init__.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ def queue(self, file_data, guid=None):
128128

129129
return Extraction(None, 'FAILED')
130130

131-
def poll(self, extraction, max_tries=100, interval=10.0, suppress_output=False): # pylint: disable=too-many-branches
131+
def poll(self, extraction, max_tries=100, interval=10.0, suppress_output=False, with_probabilities=False): # pylint: disable=too-many-branches
132132
"""Check if prediction is done"""
133133

134134
# Helper function
@@ -144,7 +144,8 @@ def estimate_extraction_time(bounding_box_count):
144144
time.sleep(interval)
145145

146146
result = requests.get(
147-
f'{self.url}extractions/{extraction_guid}/data', auth=TokenAuth(self.token)
147+
f'{self.url}extractions/{extraction_guid}/data', auth=TokenAuth(self.token),
148+
params={'probabilities': with_probabilities}
148149
)
149150

150151
if result.status_code == requests.codes.ok: # pylint: disable=no-member

0 commit comments

Comments
 (0)