leavoigt commited on
Commit
fe1fed4
1 Parent(s): 3a3c936

Update utils/vulnerability_classifier.py

Browse files
Files changed (1) hide show
  1. utils/vulnerability_classifier.py +4 -1
utils/vulnerability_classifier.py CHANGED
@@ -40,7 +40,10 @@ def get_vulnerability_labels(preds):
40
  st.write(preds_list)
41
 
42
  # Get the name of the group where the prediction is equal to "1"
43
- result = [label_dict[key] for key, value in enumerate(preds_list) if value == 1]
 
 
 
44
 
45
  st.write("Here are the results")
46
  st.write(result)
 
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)