Skip to content

Instantly share code, notes, and snippets.

@yogeshnile
Created July 15, 2020 09:10
Show Gist options
  • Save yogeshnile/080fa1ee89ae50cf67dd0323eaa5163f to your computer and use it in GitHub Desktop.
Save yogeshnile/080fa1ee89ae50cf67dd0323eaa5163f to your computer and use it in GitHub Desktop.
#Import Pickle file
file_name = "Spam_sms_prediction.pkl"
classifier = pickle.load(open(file_name, 'rb'))
file_name = "corpus.pkl"
corpus = pickle.load(open(file_name, 'rb'))
#Creating the Bag of Words model
cv = CountVectorizer(max_features=2500)
X = cv.fit_transform(corpus).toarray()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment