Spaces:
Sleeping
Sleeping
halimbahae
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -92,10 +92,14 @@ def display_word_count(df):
|
|
92 |
st.title("Word Count")
|
93 |
st.write("Select the number of words to display and exclude words.")
|
94 |
|
95 |
-
|
96 |
|
97 |
-
|
98 |
-
|
|
|
|
|
|
|
|
|
99 |
|
100 |
word_counts = {}
|
101 |
for row in df.itertuples(index=False):
|
|
|
92 |
st.title("Word Count")
|
93 |
st.write("Select the number of words to display and exclude words.")
|
94 |
|
95 |
+
col1, col2 = st.columns(2)
|
96 |
|
97 |
+
with col1:
|
98 |
+
word_count = st.slider("Select Number of Words", min_value=10, max_value=50, value=10, key="word_count_slider")
|
99 |
+
|
100 |
+
with col2:
|
101 |
+
words_to_exclude = st.text_input("Words to Exclude (comma-separated)", "", key="exclude_words_input")
|
102 |
+
words_to_exclude = [word.strip() for word in words_to_exclude.split(",")]
|
103 |
|
104 |
word_counts = {}
|
105 |
for row in df.itertuples(index=False):
|