在Heroku上打开Flask应用程序时显示“应用程序错误”

时间:2020-07-27 16:05:47

标签: python flask heroku

这是我第一次使用Heroku。我建立了一个深度学习烧瓶网络应用程序。它在本地计算机上运行良好,但是当我尝试打开应用程序时,它显示“应用程序错误”。我已更改了requirements.txt和procfile,以查看其他社区页面上建议的效果,但效果不佳。

我的文件结构:

8*8

Procfile

ImageClassifier_DeepLearning
 |
 + static
 |      |
 |      + style.css
 |
 + templates
 |       |
 |       + index.html
 |       + index2.html
 |       + show.html
 |       + upload.html
 |
 + uploads
 |       | 
 |       +.jpg,.jpeg ....
 |
 + Procfile
 |
 + requirements.txt
 |
 + app.py
 |
 + model2.h5

在这里,我正在附加我的日志文件。 多谢有人帮助!

enter image description here

1 个答案:

答案 0 :(得分:0)

您需要将main-api:app文件中的app:app更改为Procfile

web: gunicorn --bind 0.0.0.0:22471 app:app