Created
September 4, 2019 11:39
-
-
Save pemagrg1/974fa10137212022321b6b79a22316a7 to your computer and use it in GitHub Desktop.
Revisions
-
pemagrg1 created this gist
Sep 4, 2019 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,10 @@ import pickle Project_path = "<path to project>" model_path = Project_path + "/08. Multi-class_text_classification/models/model.pickle" vectorizer_path = Project_path + "/08. Multi-class_text_classification/models/vectorizer.pickle" vectorizer = pickle.load(open(vectorizer_path,'rb')) model = pickle.load(open(model_path,'rb')) pred = model.predict(vectorizer.transform(["i have got a new phone. its from Apple.. and i love it!"]))[0] print ("predicted class:", pred)