Spaces:
Running
Running
Update utils/target_classifier.py
Browse files
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
|
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:
|