Skip to content

Instantly share code, notes, and snippets.

@velotiotech
Created July 3, 2020 04:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save velotiotech/794e8d8857b5a7559b5146ec73f6433d to your computer and use it in GitHub Desktop.
Save velotiotech/794e8d8857b5a7559b5146ec73f6433d to your computer and use it in GitHub Desktop.
#Loading model and vocab
print("Loading pre-trained model")
vocabulary_to_load = pickle.load(open("vocab.pickle", 'rb'))
count_vect = CountVectorizer(vocabulary=vocabulary_to_load)
load_model = pickle.load(open("model.pickle", 'rb'))count_vect._validate_vocabulary()
tfidf_transformer = tf_idf(categories)[0]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment