leavoigt commited on
Commit
1b68565
1 Parent(s): fe1fed4

Update utils/vulnerability_classifier.py

Browse files
Files changed (1) hide show
  1. utils/vulnerability_classifier.py +2 -3
utils/vulnerability_classifier.py CHANGED
@@ -37,13 +37,12 @@ def get_vulnerability_labels(preds):
37
 
38
  # Get label names
39
  preds_list = preds.tolist()
40
- st.write(preds_list)
41
 
42
  # Get the name of the group where the prediction is equal to "1"
43
  result = []
44
 
45
- for sublist in my_list_of_lists:
46
- result.extend([my_dict[key] for key, value in enumerate(sublist) if value == 1])
47
 
48
  st.write("Here are the results")
49
  st.write(result)
 
37
 
38
  # Get label names
39
  preds_list = preds.tolist()
 
40
 
41
  # Get the name of the group where the prediction is equal to "1"
42
  result = []
43
 
44
+ for sublist in preds_list:
45
+ result.extend([label_dict[key] for key, value in enumerate(sublist) if value == 1])
46
 
47
  st.write("Here are the results")
48
  st.write(result)