I have a pickled model file on my desktop on Mac. I want to load it to my Jupyter notebook. However, when I try this code:
import pickle
file_1 = open('RFonevsrest2_model.sav', 'r')
loaded_model = pickle.load(file_1)
I get an error saying there is No such file or directory. I do not know how to get the file inside my working directory or access is from local. Please help.
Specifying the path where the model resides and then using Joblib to access it does the trick:
RFmodel=open("/Users/sayontimondal/Desktop/RFonevsrest2_model.sav") loaded_model = joblib.load(RFmodel)