Spaces:
Sleeping
Sleeping
EmreYY20
commited on
Commit
·
cce90fc
1
Parent(s):
a67109b
update
Browse files
app.py
CHANGED
@@ -1,10 +1,7 @@
|
|
1 |
import streamlit as st
|
2 |
import PyPDF2
|
3 |
from extractive_model import summarize_with_textrank
|
4 |
-
from blanc import BlancHelp
|
5 |
-
|
6 |
-
# Initialize BLANC
|
7 |
-
#blanc_help = BlancHelp()
|
8 |
|
9 |
# Set page to wide mode
|
10 |
st.set_page_config(layout="wide")
|
@@ -51,9 +48,6 @@ def main():
|
|
51 |
if radio_selection == "Extractive":
|
52 |
summary = summarize_with_textrank(file_content)
|
53 |
st.session_state.summary = summary
|
54 |
-
# Perform BLANC evaluation
|
55 |
-
#blanc_help_score = blanc_help.eval_once(file_content, st.session_state.summary)
|
56 |
-
#st.session_state.blanc_help = blanc_help_score
|
57 |
|
58 |
# Perform extractive summarization
|
59 |
if radio_selection == "Abstractive":
|
@@ -64,9 +58,8 @@ def main():
|
|
64 |
# Right column: Displaying text after pressing 'Summarize'
|
65 |
with col3:
|
66 |
st.write("Summary:")
|
67 |
-
|
68 |
-
|
69 |
-
# st.write(f"BLANC-Help: {st.session_state.blanc_help}")
|
70 |
|
71 |
if __name__ == "__main__":
|
72 |
main()
|
|
|
1 |
import streamlit as st
|
2 |
import PyPDF2
|
3 |
from extractive_model import summarize_with_textrank
|
4 |
+
#from blanc import BlancHelp
|
|
|
|
|
|
|
5 |
|
6 |
# Set page to wide mode
|
7 |
st.set_page_config(layout="wide")
|
|
|
48 |
if radio_selection == "Extractive":
|
49 |
summary = summarize_with_textrank(file_content)
|
50 |
st.session_state.summary = summary
|
|
|
|
|
|
|
51 |
|
52 |
# Perform extractive summarization
|
53 |
if radio_selection == "Abstractive":
|
|
|
58 |
# Right column: Displaying text after pressing 'Summarize'
|
59 |
with col3:
|
60 |
st.write("Summary:")
|
61 |
+
if 'summary' in st.session_state:
|
62 |
+
st.write(st.session_state.summary)
|
|
|
63 |
|
64 |
if __name__ == "__main__":
|
65 |
main()
|