使用 Heroku 部署 Streamlit 应用时出现问题

时间:2021-01-31 08:17:33

标签: python heroku deployment streamlit

尝试在 Heroku 上部署我的 Streamlit 应用程序时出现问题。错误显示:

2021-01-31T08:05:31.912498+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/" host=tweetsenitments.herokuapp.com request_id=11d4b0d8-5f39-40ee-8394-ea9dafe591d0 fwd="103.120.57.242" dyno= connect= service= status=503 bytes= protocol=https
2021-01-31T08:05:32.461450+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/favicon.ico" host=tweetsenitments.herokuapp.com request_id=a32d26d8-0ca6-429e-b785-a5ee037c0e56 fwd="103.120.57.242" dyno= connect= service= status=503 bytes= protocol=https

我的Procfile如图所示:

web: sh setup.sh && streamlit run app.py

我的Setup.sh文件如下图:

mkdir -p ~/.streamlit/
echo "\
[general]\n\
email = \"nshnt1999@gmail.com\"\n\
" > ~/.streamlit/credentials.toml
echo "\
[server]\n\
headless = true\n\
enableCORS=false\n\
port = $PORT\n\
" > ~/.streamlit/config.toml

我尝试了一些我发现的不同建议,例如删除 Procfile 中 web: 和 sh 之间的空间,但到目前为止还没有运气。任何建议将不胜感激。

Github 链接: https://github.com/nshnt1999/TwitterSentimentAnalysis

0 个答案:

没有答案