Spaces:
Sleeping
Sleeping
Vipul-Chauhan
commited on
Commit
•
19874e4
1
Parent(s):
0b102b1
Update app.py
Browse files
app.py
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
#loading tfidf dataset
|
2 |
import pandas as pd
|
3 |
-
newsdf_sample = pd.read_excel("
|
4 |
|
5 |
#preprocessing for better tokenization (needed for tfidf)
|
6 |
import nltk
|
@@ -61,8 +61,8 @@ def process_row(row):
|
|
61 |
return row
|
62 |
|
63 |
import pickle
|
64 |
-
kmeans_tfidf = pickle.load( open( "
|
65 |
-
vectorizer = pickle.load(open("
|
66 |
|
67 |
import matplotlib.pyplot as plt
|
68 |
from wordcloud import WordCloud
|
|
|
1 |
#loading tfidf dataset
|
2 |
import pandas as pd
|
3 |
+
newsdf_sample = pd.read_excel("200_sample_each_20newsgroup_4k_tfidf.xlsx",engine="openpyxl")
|
4 |
|
5 |
#preprocessing for better tokenization (needed for tfidf)
|
6 |
import nltk
|
|
|
61 |
return row
|
62 |
|
63 |
import pickle
|
64 |
+
kmeans_tfidf = pickle.load( open( "kmeans_tfidf_20.p", "rb" ) )
|
65 |
+
vectorizer = pickle.load(open("tfidf_vectorizer.p","rb"))
|
66 |
|
67 |
import matplotlib.pyplot as plt
|
68 |
from wordcloud import WordCloud
|