'DecisionTreeClassifier' object has no attribute 'monotonic_cst'

The app I created is working in my local URL, but returning the below error, when I push the button predict in the deployed version.

  1. https://omadligroup.streamlit.app/
  2. GitHub - kmamaroziqov/Customer-Churn
    3.Error Text: ‘DecisionTreeClassifier’ object has no attribute ‘monotonic_cst’
  3. Python 3.11.8 and streamlit==1.31.1

Hey @smartboy . I have seen your requirements.txt file. There were so many dependencies which won’t helpful. Change the requirements.txt as follows:-

streamlit==1.31.1
scikit-learn==1.3.2
joblib
pandas

The error which you occurred was related to scikit-learn version. Hope the above mentioned dependencies works fine. Don’t forget to reboot the application once you completed the changes in requirements.txt file.

Happy Streamlit-ing :balloon:

Thanks fo your help. Let me try and get back to you

1 Like

Thanks for your assistance. it worked when I marked the version of streamlit==1.31.1

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.