Streamlit Cloud Installs Wrong Version of Library

Streamlit installs the latest stable version of scikit-learn, instead of the specified version in my requirements file. I don’t understand why it overrides the version I specify in the requirements file. Can someone please help look into why this is happening?

  1. Link to the public app (deployed on Community Cloud).
    Streamlit (breathe-easy.streamlit.app)

  2. Link to my app’s public GitHub repository:
    divijkulshrestha/capstone_project. (github.com)

  3. Error Message:

InconsistentVersionWarning:
Trying to unpickle estimator DecisionTreeRegressor from version 0.22.2.post1 when using version 1.4.2. This might lead to breaking code or invalid results. Use at your own risk.

Using uv pip install.
Resolved 44 packages in 1.31s
Downloaded 44 packages in 3.54s
Installed 44 packages in 83ms
+ scikit-learn==1.4.2

uv pip install is going with version 1.4.2, but I specifically want to use 0.22.2 to resolve the above error. It is also using the below version of Streamlit

streamlit version ==0.82.0