Dzhamb commited on
Commit
547522b
1 Parent(s): 6d201d9

Update utils.py

Browse files
Files changed (1) hide show
  1. utils.py +2 -1
utils.py CHANGED
@@ -30,7 +30,8 @@ def get_labels(text, model, tokenizer, count_labels=8):
30
  result_labels = []
31
  for pair in sort_lst:
32
  cumsum += pair[0]
33
- if cumsum > 0.95 and len(result_labels) >= 1:
 
34
  return result_labels
35
  result_labels.append(pair[1])
36
 
 
30
  result_labels = []
31
  for pair in sort_lst:
32
  cumsum += pair[0]
33
+ if cumsum > 0.95:
34
+ result_labels.append(pair[1])
35
  return result_labels
36
  result_labels.append(pair[1])
37