Spaces:
Runtime error
Runtime error
Commit ·
474b498
1
Parent(s): 41fdda1
Update app.py
Browse files
app.py
CHANGED
|
@@ -12,11 +12,10 @@ def get_bert_keywords(text, num_keywords):
|
|
| 12 |
# Streamlit app
|
| 13 |
st.title("Keyword Extraction with KeyBERT")
|
| 14 |
text = st.text_area("Enter your text here:", value='', height=200)
|
| 15 |
-
num_keywords = st.slider("Number of keywords:", min_value=1, max_value=10, value=5, step=1)
|
| 16 |
|
| 17 |
if st.button("Extract Keywords"):
|
| 18 |
if text:
|
| 19 |
-
keywords = get_bert_keywords(text,
|
| 20 |
st.write("Keywords:")
|
| 21 |
st.write(", ".join(keywords))
|
| 22 |
else:
|
|
|
|
| 12 |
# Streamlit app
|
| 13 |
st.title("Keyword Extraction with KeyBERT")
|
| 14 |
text = st.text_area("Enter your text here:", value='', height=200)
|
|
|
|
| 15 |
|
| 16 |
if st.button("Extract Keywords"):
|
| 17 |
if text:
|
| 18 |
+
keywords = get_bert_keywords(text, 5)
|
| 19 |
st.write("Keywords:")
|
| 20 |
st.write(", ".join(keywords))
|
| 21 |
else:
|