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

fic words_counts

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -48,7 +48,10 @@ with open('RandomForestClassifier.pkl', 'rb') as file:
48
 
49
 
50
  input_paragraph = st.text_area("Input your text here")
51
- st.write('Words counts: ', word_tokenize(input_paragraph))
 
 
 
52
 
53
  # df = pd.DataFrame(columns=["paragraph"])
54
  # df = df.append({"paragraph": input_paragraph}, ignore_index=True)
 
48
 
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
 
56
  # df = pd.DataFrame(columns=["paragraph"])
57
  # df = df.append({"paragraph": input_paragraph}, ignore_index=True)