jaifar530 commited on
Commit
7755f36
·
unverified ·
1 Parent(s): 8e3d89c

fix words count

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -49,7 +49,8 @@ with open('RandomForestClassifier.pkl', 'rb') as file:
49
 
50
  input_paragraph = st.text_area("Input your text here")
51
  words_counts = word_tokenize(input_paragraph)
52
- st.write('Words counts: ', sum(len(words_count) for words_count in words_counts))
 
53
 
54
 
55
 
@@ -115,7 +116,7 @@ def extract_features(text):
115
 
116
 
117
  # Creates a button named 'Press me'
118
- press_me_button = st.button("Press me")
119
 
120
  if press_me_button:
121
  input_features = df['paragraph'].apply(extract_features)
 
49
 
50
  input_paragraph = st.text_area("Input your text here")
51
  words_counts = word_tokenize(input_paragraph)
52
+ final_words = sum(len(words_count) for words_count in words_counts)
53
+ st.write('Words counts: ', final_words)
54
 
55
 
56
 
 
116
 
117
 
118
  # Creates a button named 'Press me'
119
+ press_me_button = st.button("Which Model Used?")
120
 
121
  if press_me_button:
122
  input_features = df['paragraph'].apply(extract_features)