Skip to content

Instantly share code, notes, and snippets.

@mbednarski
Created November 7, 2018 22:13
Show Gist options
  • Save mbednarski/34aaabab7e5ab0a9a7e9768d78a2fb9f to your computer and use it in GitHub Desktop.
Save mbednarski/34aaabab7e5ab0a9a7e9768d78a2fb9f to your computer and use it in GitHub Desktop.
import pickle
with open('tfidf.pickle', 'rb') as f:
tfidf = pickle.load(f)
with open('model.pickle', 'rb') as f:
clf = pickle.load(f)
x = input("Please enter your phrase: ")
y = clf.predict_proba(tfidf.transform([x]))
print(y[0])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment