Spaces:
Sleeping
Sleeping
Update utils/vulnerability_classifier.py
Browse files
utils/vulnerability_classifier.py
CHANGED
|
@@ -37,12 +37,14 @@ def get_vulnerability_labels(preds):
|
|
| 37 |
|
| 38 |
# Get label names
|
| 39 |
preds_list = preds.tolist()
|
| 40 |
-
st.write(
|
|
|
|
| 41 |
# Get the name of the group where the prediction is equal to "1"
|
| 42 |
result = [label_dict[key] for key, value in enumerate(preds_list) if value == 1]
|
| 43 |
|
| 44 |
st.write("Here are the results")
|
| 45 |
st.write(result)
|
|
|
|
| 46 |
return result
|
| 47 |
|
| 48 |
@st.cache_resource
|
|
|
|
| 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 = [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)
|
| 47 |
+
|
| 48 |
return result
|
| 49 |
|
| 50 |
@st.cache_resource
|