I am trying to write a file with my main function in my app.py file. Eventually, I added this line
if 'liveconsole' not in gethostname():
app.run()
after which it worked exactly once. Now, it is back to not working despite no code changes. Here is the exact main I executed when it originally worked. I reload my app every time I make changes.
if __name__ == '__main__':
clf = update_model(db_path=db,
model=clf,
batch_size=10000)
pickle.dump(clf, open(os.path.join(cur_dir,
'pkl_objects', 'classifier5.pkl'), 'wb')
, protocol=4)
if 'liveconsole' not in gethostname():
app.run()