So I do have a flask app, I can run it in my computer locally and deployed it to heroku successfully but when I do heroku open
the site keeps on saying Application Error.
This is in my app.py:
import random
import os
from flask import Flask
from gen_histogram import histogram
from sample import generate_probability, generate_word
app = Flask(__name__)
dict_histogram = histogram('tom_sawyer.txt')
tes_list = ["one", "fish", "two", "fish", "red", "fish", "blue", "fish"]
def try_random():
return random.choice(tes_list)
@app.route('/')
def hello_world():
return try_random()
if __name__ == '__main__':
port = int(os.environ.get("PORT", 5000))
app.run(debug=True, port=port)
Procfile:
web: gunicorn app:app
Notes:
I have everything setup including virtualenv and requirements.txt