Spaces:
Running
Running
Update appStore/vulnerability_analysis.py
Browse files
appStore/vulnerability_analysis.py
CHANGED
@@ -56,8 +56,11 @@ def app():
|
|
56 |
|
57 |
### Main app code ###
|
58 |
with st.container():
|
59 |
-
|
|
|
60 |
if 'key0' in st.session_state:
|
|
|
|
|
61 |
df = st.session_state.key0
|
62 |
classifier = load_vulnerabilityClassifier(classifier_name=params['model_name'])
|
63 |
st.session_state['{}_classifier'.format(classifier_identifier)] = classifier
|
@@ -67,8 +70,8 @@ def app():
|
|
67 |
df = vulnerability_classification(haystack_doc=df,
|
68 |
threshold= params['threshold'])
|
69 |
|
70 |
-
# Store df in session state
|
71 |
-
st.session_state.
|
72 |
|
73 |
|
74 |
|
|
|
56 |
|
57 |
### Main app code ###
|
58 |
with st.container():
|
59 |
+
|
60 |
+
# If a document has been processed
|
61 |
if 'key0' in st.session_state:
|
62 |
+
|
63 |
+
# Run vulnerability classifier
|
64 |
df = st.session_state.key0
|
65 |
classifier = load_vulnerabilityClassifier(classifier_name=params['model_name'])
|
66 |
st.session_state['{}_classifier'.format(classifier_identifier)] = classifier
|
|
|
70 |
df = vulnerability_classification(haystack_doc=df,
|
71 |
threshold= params['threshold'])
|
72 |
|
73 |
+
# Store df in session state with key1
|
74 |
+
st.session_state.key1 = df
|
75 |
|
76 |
|
77 |
|