nlpblogs commited on
Commit
94d962f
·
verified ·
1 Parent(s): 394179b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -0
app.py CHANGED
@@ -57,6 +57,14 @@ if uploaded_files:
57
  result = pd.concat(frames)
58
  st.dataframe(result)
59
 
 
 
 
 
 
 
 
 
60
 
61
 
62
 
 
57
  result = pd.concat(frames)
58
  st.dataframe(result)
59
 
60
+ vec = TfidfVectorizer()
61
+ tf_idf = vec.fit_transform(corpus)
62
+ x = pd.DataFrame(tf_idf.toarray(), columns=vec.get_feature_names_out())
63
+ st.dataframe(x)
64
+ cosine_sim = cosine_similarity(tf_idf, tf_idf)
65
+ st.dataframe(cosine_sim)
66
+
67
+
68
 
69
 
70