try
Browse files
app.py
CHANGED
@@ -42,22 +42,28 @@ def main():
|
|
42 |
c1, c2 = st.columns(2)
|
43 |
|
44 |
with c1:
|
|
|
45 |
with st.expander("LexRank Summary"):
|
46 |
-
|
47 |
-
|
|
|
48 |
"Summary":len(summary)
|
49 |
}
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
x='metrics',y='rouge-1'
|
59 |
-
|
60 |
-
|
|
|
|
|
|
|
|
|
61 |
|
62 |
with c2:
|
63 |
with st.expander("TextRank Summary"):
|
|
|
42 |
c1, c2 = st.columns(2)
|
43 |
|
44 |
with c1:
|
45 |
+
|
46 |
with st.expander("LexRank Summary"):
|
47 |
+
try:
|
48 |
+
summary = sumy_summarizer(raw_text)
|
49 |
+
document_len={"Original":len(raw_text),
|
50 |
"Summary":len(summary)
|
51 |
}
|
52 |
+
st.write(document_len)
|
53 |
+
st.write(summary)
|
54 |
+
st.info("Rouge Score")
|
55 |
+
score=evaluate_summary(summary,raw_text)
|
56 |
+
st.write(score.T)
|
57 |
+
st.subheader(" ")
|
58 |
+
score['metrics']=score.index
|
59 |
+
c=at.Chart(score).mark_bar().encode(
|
60 |
x='metrics',y='rouge-1'
|
61 |
+
)
|
62 |
+
st.altair_chart(c)
|
63 |
+
catch:
|
64 |
+
st.warning('Insufficient data')
|
65 |
+
|
66 |
+
|
67 |
|
68 |
with c2:
|
69 |
with st.expander("TextRank Summary"):
|