Spaces:
Running
Running
EmreYY20
commited on
Commit
·
6f823ae
1
Parent(s):
97f7d3e
update
Browse files
app.py
CHANGED
@@ -61,8 +61,12 @@ def main():
|
|
61 |
|
62 |
# Perform extractive summarization
|
63 |
if radio_selection == "Extractive":
|
|
|
64 |
summary = summarize_with_textrank(file_content)
|
65 |
st.session_state.summary = summary
|
|
|
|
|
|
|
66 |
|
67 |
# Perform extractive summarization
|
68 |
if radio_selection == "Abstractive":
|
@@ -75,9 +79,7 @@ def main():
|
|
75 |
st.write("Summary:")
|
76 |
if 'summary' in st.session_state:
|
77 |
st.write(st.session_state.summary)
|
78 |
-
|
79 |
-
# Display overlap percentage
|
80 |
-
if 'overlap' in st.session_state:
|
81 |
st.write(f"Overlap with Original Text: {st.session_state.overlap:.2f}%")
|
82 |
|
83 |
if __name__ == "__main__":
|
|
|
61 |
|
62 |
# Perform extractive summarization
|
63 |
if radio_selection == "Extractive":
|
64 |
+
# Perform extractive summarization
|
65 |
summary = summarize_with_textrank(file_content)
|
66 |
st.session_state.summary = summary
|
67 |
+
# Calculate overlap
|
68 |
+
overlap = calculate_overlap(file_content, summary)
|
69 |
+
st.session_state.overlap = overlap
|
70 |
|
71 |
# Perform extractive summarization
|
72 |
if radio_selection == "Abstractive":
|
|
|
79 |
st.write("Summary:")
|
80 |
if 'summary' in st.session_state:
|
81 |
st.write(st.session_state.summary)
|
82 |
+
if radio_selection == "Extractive" and 'overlap' in st.session_state:
|
|
|
|
|
83 |
st.write(f"Overlap with Original Text: {st.session_state.overlap:.2f}%")
|
84 |
|
85 |
if __name__ == "__main__":
|