I trained a xgboost model in kaggle, Now I want to use that model for deployment. During deployment it is showing error as
NumExpr defaulting to 8 threads.
and it stops.
Here is the code when user presses submit button.
predict=st.button('submit') model_path='R:/home-ste-deployment/xgb.pkl' if predict: model_data=data.values model_data=scaler.transform(model_data) with open(model_path,'rb') as f: model=pickle.load(f) predictions=model.predict(model_data) st.write(predictions)
I am having same version of xgboost on my system which I used for training purpose.
If I simply run the code as below I am getting output, but not when using in streamlit code.
with open(model_path,'rb') as f: model=pickle.load(f) predictions=model.predict(np.zeros((1,451))) print(predictions)