Created
April 21, 2019 12:21
-
-
Save prateekjoshi565/187b95c55d5d4789fb1d33075d17564b to your computer and use it in GitHub Desktop.
genre_inference
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def infer_tags(q): | |
q = clean_text(q) | |
q = remove_stopwords(q) | |
q_vec = tfidf_vectorizer.transform([q]) | |
q_pred = clf.predict(q_vec) | |
return multilabel_binarizer.inverse_transform(q_pred) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment