Spaces:
Sleeping
Sleeping
Update utils/vulnerability_classifier.py
Browse files
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 = [
|
|
|
|
|
|
|
|
|
|
| 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)
|