Update app.py
Browse files
app.py
CHANGED
@@ -117,8 +117,8 @@ if 'key0' in st.session_state:
|
|
117 |
|
118 |
# Text
|
119 |
num_paragraphs = len(df_vul['Vulnerability Label'])
|
120 |
-
num_references =
|
121 |
-
|
122 |
st.markdown(f"""<div style="text-align: justify;"> The document contains a
|
123 |
total of <span style="color: red;">{num_paragraphs}</span> paragraphs.
|
124 |
We identified <span style="color: red;">{num_references}</span>
|
@@ -151,7 +151,7 @@ if 'key0' in st.session_state:
|
|
151 |
df_label_count = pd.DataFrame(list(group_counts.items()), columns=['Label', 'Count'])
|
152 |
|
153 |
# Merge the label counts with the df_label DataFrame
|
154 |
-
df_label_count = df_labels.merge(
|
155 |
st.write("df_label_count")
|
156 |
|
157 |
# # Configure graph
|
|
|
117 |
|
118 |
# Text
|
119 |
num_paragraphs = len(df_vul['Vulnerability Label'])
|
120 |
+
num_references = df_vul['Vulnerability Label'].apply(lambda x: 'Other' not in x).sum()
|
121 |
+
|
122 |
st.markdown(f"""<div style="text-align: justify;"> The document contains a
|
123 |
total of <span style="color: red;">{num_paragraphs}</span> paragraphs.
|
124 |
We identified <span style="color: red;">{num_references}</span>
|
|
|
151 |
df_label_count = pd.DataFrame(list(group_counts.items()), columns=['Label', 'Count'])
|
152 |
|
153 |
# Merge the label counts with the df_label DataFrame
|
154 |
+
df_label_count = df_labels.merge(df_label_count, on='Label', how='left')
|
155 |
st.write("df_label_count")
|
156 |
|
157 |
# # Configure graph
|