Skip to content

Instantly share code, notes, and snippets.

@prateekjoshi565
Created April 21, 2019 12:21
genre_inference
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