How to change the version of streamlit and scikit-learn on community cloud

I want to deploy an ml app on streamlit cloud now I want to use specific versions of streamlit and Scikit-learn and nltk. Now I do not have the “advanced settings” option to do this and I’ve added the versions in the requirements.txt file like this:

streamlit>=1.29.0
scikit-learn>=1.3.2
nltk>=3.8.1

But this is not helping. Please help me solve the problem

Hi @Ardra_Ajay . Then just made the changes of your GitHub repo and then reboot the app once. Now the new app will build based on the updated requirements version mentioned in your GitHub repo. Feel to free to ask if it’s not work.

Happy Streamlit-ing :balloon:

I did that but it doesn’t change the version I deleted the app and deployed again but it isn’t changing. But I’m able use the specified version on pycharm and run streamlit on local host and it is working. I can’t seem to figure out how to use the specified versions in streamlit community cloud.

Hey instead use the following packages without versions:-

streamlit
nltk
scikit-learn

Don’t forget that to use python 3.9 before deploying the app!!

No this did not help! I want to use those specified versions
streamlit>=1.29.0
scikit-learn>=1.3.2
nltk>=3.8.1
removing it did not help also i used python 3.9 before deploying the app

Hi @Ardra_Ajay . May i know the exact error you are facing while using those mentioned package specifications!

Hi I fixed it. I used python 3.10 and this is what I wrote in the requirements.txt file

streamlit==1.29.0
scikit-learn==1.3.2
nltk==3.8.1

Now my app is working.
Thank you!

Is the above versions are working fine???

Yes now the problem is solved. Thank you for trying to help me I appreciate your efforts!

1 Like

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