Spaces:
Sleeping
Sleeping
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 (Fine-tuned BART)', "Abstractive (BART-large-CNN)", 'Extractive (TextRank)',
|
30 |
"Extractive (Latent Semantic Analysis)", 'Keyphrase Extraction (RAKE)', 'Keyword Extraction (RAKE)']
|
31 |
|
32 |
help_text = "Abstractive: Abstractive summarization generates a summary that may contain words not present in the original text. " \
|
@@ -76,6 +76,16 @@ def main():
|
|
76 |
summary = summarize_with_bart(file_content)
|
77 |
st.session_state.summary = summary
|
78 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
79 |
# Perform Keyword Extraction
|
80 |
if radio_selection == "Keyword Extraction (RAKE)":
|
81 |
summary = extract_keywords(file_content)
|
|
|
26 |
|
27 |
# Left column: Radio buttons for summarizer choice
|
28 |
with col1:
|
29 |
+
radio_options = ["Abstractive (T5)", "Abstractive (LED)", 'Abstractive (Fine-tuned BART)', "Abstractive (BART-large-CNN)", 'Extractive (TextRank)',
|
30 |
"Extractive (Latent Semantic Analysis)", 'Keyphrase Extraction (RAKE)', 'Keyword Extraction (RAKE)']
|
31 |
|
32 |
help_text = "Abstractive: Abstractive summarization generates a summary that may contain words not present in the original text. " \
|
|
|
76 |
summary = summarize_with_bart(file_content)
|
77 |
st.session_state.summary = summary
|
78 |
|
79 |
+
# Perform extractive summarization
|
80 |
+
if radio_selection == "Abstractive (T5)":
|
81 |
+
summary = summarize_with_t5(file_content)
|
82 |
+
st.session_state.summary = summary
|
83 |
+
|
84 |
+
# Perform extractive summarization
|
85 |
+
if radio_selection == "Abstractive (LED))":
|
86 |
+
summary = summarize_with_led(file_content)
|
87 |
+
st.session_state.summary = summary
|
88 |
+
|
89 |
# Perform Keyword Extraction
|
90 |
if radio_selection == "Keyword Extraction (RAKE)":
|
91 |
summary = extract_keywords(file_content)
|