Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -13,8 +13,8 @@ placeholder = st.empty()
|
|
13 |
text_input = placeholder.text_area("Paste or write text", height=300)
|
14 |
|
15 |
top_n = st.sidebar.slider("Select a number of keywords", 1, 10, 5, 1)
|
16 |
-
min_ngram = st.sidebar.
|
17 |
-
max_ngram = st.sidebar.
|
18 |
st.sidebar.code(f"ngram_range=({min_ngram}, {max_ngram})")
|
19 |
|
20 |
params = {"docs": text_input, "top_n": top_n, "keyphrase_ngram_range": (min_ngram, max_ngram), "stop_words": 'english'}
|
|
|
13 |
text_input = placeholder.text_area("Paste or write text", height=300)
|
14 |
|
15 |
top_n = st.sidebar.slider("Select a number of keywords", 1, 10, 5, 1)
|
16 |
+
min_ngram = st.sidebar.number_input("Minimum number of words in each keyword", 1, 5, 1, 1)
|
17 |
+
max_ngram = st.sidebar.number_input("Maximum number of words in each keyword", min_ngram, 5, 3, step=1)
|
18 |
st.sidebar.code(f"ngram_range=({min_ngram}, {max_ngram})")
|
19 |
|
20 |
params = {"docs": text_input, "top_n": top_n, "keyphrase_ngram_range": (min_ngram, max_ngram), "stop_words": 'english'}
|