I have some trained machine learning model saved in a django project, it is multiple files involved (x.p + x_01.npy + ... + x_0n.npy), and I am trying to load them in views.py, got file not found exception, wonder what is the correct way using joblib or pickle for deserialization in django
def home(request):
classifierDumpFilesDir = os.path.join(settings.BASE_DIR,'myfiles\ExportedFileName.p')
classifier = joblib.load(classifierDumpFilesDir)
prediction = classifier.predict([2,0])
return render(
request,
'app/index.html',
{
'title':'Home Page',
'year':datetime.now().year,
}
)