Skip to content
Snippets Groups Projects
Commit 86d07bc5 authored by Amir MOHAMMADI's avatar Amir MOHAMMADI
Browse files

key is in bytes format in Python 3

parent c6200934
Branches
Tags
1 merge request!47Many changes
......@@ -240,6 +240,9 @@ def main(argv=None):
pred_buffer = defaultdict(list)
for i, pred in enumerate(predictions):
key = pred['key']
# key is in bytes format in Python 3
if sys.version_info >= (3, ):
key = key.decode(errors='replace')
prob = pred.get('probabilities', pred.get('embeddings'))
pred_buffer[key].append(prob)
if i == 0:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment