The only issue I have encountered so far is NLTK dependencies downloads that PIP cannot handle.
the app rely on some NLTK dependencies such as stopwords wordnet pros_cons reuters. which pip cannot download.
While deploying to heroku, these dependencies were solved by listing in a nltk.txt file.
but seems not to be working with streamlit team.
Is there any special requirements file for nltk dependencies with streamlit team ???
Hi @Bamigbade_Opeyemi! Glad to hear that you found the deployment platform useful!
Re NLTK - a workaround is to use nltk.download(...) to download the specific dataset you are looking for (example 1, example 2). Let me know if it does not work for you for some reason.
Also it’s a good suggestion to support a nltk.txt file in the app repository alongside requirements.txt. I’ll create a feature request internally to keep track of it.
nltk.download(...) on the main file might be efficient for now because, for every instance, the files will be downloaded which will lead to increase latency.
I will just wait for the nltk.txt feature inclusion.
Re latency - I think it’s inevitable that each app instance will have to download the dataset, even if we supported nltk.txt. The latency cost is in starting up an app instance. Once the dataset has been downloaded by an instance, it should be available locally for the lifetime of that instance.
Thanks for stopping by! We use cookies to help us understand how you interact with our website.
By clicking “Accept all”, you consent to our use of cookies. For more information, please see our privacy policy.
Cookie settings
Strictly necessary cookies
These cookies are necessary for the website to function and cannot be switched off. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms.
Performance cookies
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us understand how visitors move around the site and which pages are most frequently visited.
Functional cookies
These cookies are used to record your choices and settings, maintain your preferences over time and recognize you when you return to our website. These cookies help us to personalize our content for you and remember your preferences.
Targeting cookies
These cookies may be deployed to our site by our advertising partners to build a profile of your interest and provide you with content that is relevant to you, including showing you relevant ads on other websites.