Search code examples
pythonherokustreamlit

Problem deploying streamlit webapp on heroku


Everything works fine Locally.

However when I try pushing the project to heroku, the following error comes up. enter image description here

Here is my Procfile: web: sh setup.sh && streamlit run application.py

setup.sh:

mkdir -p ~/.streamlit/

echo "\
[general]\n\
email = \"[email protected]\"\n\
" > ~/.streamlit/credentials.toml

echo "\
[server]\n\
headless = true\n\
enableCORS=false\n\
port = $PORT\n\
" > ~/.streamlit/config.toml

and requirements.txt:

streamlit==0.81.1
pandas==1.1.0
matplotlib==3.3.0
plotly==4.14.3
seaborn==0.11.1
numpy==1.18.5
scikit_learn==0.23.2

Although I'm new to this framework, I have a bit of understanding of python and a complete disaster with deploying live web app.

Any one who can point me in the right direction?

Your help is greatly anticipated and helpful.


Solution

  • Thank you for your replies @torek and @John Mee.

    Apparently all I had to do was simple.

    1. Modify pandas == 1.2.0 to pandas < 1.2.0 in the requirements.txt file.
    2. git add, commit and push to origin and to heroku.

    That's it.

    Thanks again.