Update app.py
Browse files
app.py
CHANGED
|
@@ -12,9 +12,12 @@ def main():
|
|
| 12 |
# Get user input
|
| 13 |
doc = st.text_area("Document")
|
| 14 |
|
|
|
|
|
|
|
|
|
|
| 15 |
# Extract keywords
|
| 16 |
if st.button("Extract Keywords"):
|
| 17 |
-
keywords = kw_model.extract_keywords(doc)
|
| 18 |
|
| 19 |
# Get user choice for MMR
|
| 20 |
apply_mmr = st.checkbox("Apply Maximal Marginal Relevance (MMR)")
|
|
|
|
| 12 |
# Get user input
|
| 13 |
doc = st.text_area("Document")
|
| 14 |
|
| 15 |
+
# Get user choice for stopwords removal
|
| 16 |
+
remove_stopwords = st.checkbox("Remove Stopwords")
|
| 17 |
+
|
| 18 |
# Extract keywords
|
| 19 |
if st.button("Extract Keywords"):
|
| 20 |
+
keywords = kw_model.extract_keywords(doc, stop_words=None if remove_stopwords else "english")
|
| 21 |
|
| 22 |
# Get user choice for MMR
|
| 23 |
apply_mmr = st.checkbox("Apply Maximal Marginal Relevance (MMR)")
|