leavoigt commited on
Commit
6fef1b7
1 Parent(s): ab71d04

Update utils/target_classifier.py

Browse files
Files changed (1) hide show
  1. utils/target_classifier.py +4 -1
utils/target_classifier.py CHANGED
@@ -21,12 +21,15 @@ def get_target_labels(preds):
21
  Function that takes the numerical predictions as an input and returns a list of the labels.
22
 
23
  """
 
 
 
24
 
25
  # Get label names
26
  predictions_names=[]
27
 
28
  # loop through each prediction
29
- for ele in preds:
30
 
31
  # see if there is a value 1 and retrieve index
32
  try:
 
21
  Function that takes the numerical predictions as an input and returns a list of the labels.
22
 
23
  """
24
+
25
+ # Turn into list
26
+ preds_list = list(preds)
27
 
28
  # Get label names
29
  predictions_names=[]
30
 
31
  # loop through each prediction
32
+ for ele in preds_list:
33
 
34
  # see if there is a value 1 and retrieve index
35
  try: