Hi! I am new to the community and trying to deploy my machine learning project.
My application runs machine learning model when doing clients click “calculate.” However, an error occurs when the button is clicked, which didn’t happen on local host:
AttributeError: ‘DecisionTreeRegressor’ object has no attribute ‘monotonic_cst’
Can anyone help me? Thank you!
I am not sure if this information can help:
A portion code is imported from the jupyter notebook in the same folder.
Try to specify the versions of the modules in the requirements.txt to the one you have locally and try again.
And use python 3.11 locally since streamlit does not support 3.12 in the deployment right now.
Save the downgrade version in requirements.txt on github.
Specify the correct version and save it in the requirements.txt file, such as scikit-learn==1.3.0. It will probably run. Have a nice day!!