Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -26,7 +26,7 @@ def main():
|
|
26 |
|
27 |
# Left column: Radio buttons for summarizer choice
|
28 |
with col1:
|
29 |
-
radio_options = ['Abstractive', 'Extractive', 'Keyword Extraction', 'Keyphrase Extraction']
|
30 |
help_text = "Abstractive: Abstractive summarization generates a summary that may contain words not present in the original text. " \
|
31 |
"It uses a fine-tuned model on BART-large-CNN.<br>" \
|
32 |
"Extractive: Extractive summarization selects and extracts sentences or phrases directly from the original text to create a summary using the TextRank algorithm.<br>" \
|
@@ -55,10 +55,15 @@ def main():
|
|
55 |
return
|
56 |
|
57 |
# Perform extractive summarization
|
58 |
-
if radio_selection == "Extractive":
|
59 |
summary = summarize_with_textrank(file_content)
|
60 |
st.session_state.summary = summary
|
61 |
|
|
|
|
|
|
|
|
|
|
|
62 |
# Perform extractive summarization
|
63 |
if radio_selection == "Abstractive":
|
64 |
summary = summarize_with_bart(file_content)
|
|
|
26 |
|
27 |
# Left column: Radio buttons for summarizer choice
|
28 |
with col1:
|
29 |
+
radio_options = ['Abstractive', 'Extractive (TextRank)', "Extractive (Latent Semantic Analysis)", 'Keyword Extraction', 'Keyphrase Extraction']
|
30 |
help_text = "Abstractive: Abstractive summarization generates a summary that may contain words not present in the original text. " \
|
31 |
"It uses a fine-tuned model on BART-large-CNN.<br>" \
|
32 |
"Extractive: Extractive summarization selects and extracts sentences or phrases directly from the original text to create a summary using the TextRank algorithm.<br>" \
|
|
|
55 |
return
|
56 |
|
57 |
# Perform extractive summarization
|
58 |
+
if radio_selection == "Extractive (TextRank)":
|
59 |
summary = summarize_with_textrank(file_content)
|
60 |
st.session_state.summary = summary
|
61 |
|
62 |
+
# Perform extractive summarization
|
63 |
+
if radio_selection == "Extractive (Latent Semantic Analysis)":
|
64 |
+
summary = summarize_with_lsa(file_content)
|
65 |
+
st.session_state.summary = summary
|
66 |
+
|
67 |
# Perform extractive summarization
|
68 |
if radio_selection == "Abstractive":
|
69 |
summary = summarize_with_bart(file_content)
|