Adding server-side session management with Flask-Session.
Two important benefits
I can use this to store the most recently generated word, which makes it easier to persist this to the database.
We can use this later on for session management for ML models, such that we don't have to reload them all the time.
Currently the session stores its required files in a flask_session folder which is personal, so no point in committing them to git, hence the update to the .gitignore. Once Redis is also up and running, we can switch the SESSION_TYPE from 'filesystem' to 'redis'.
Moreover I added an @login_required decorator to the index. This is because we currently have functionality in the /index route that assumes a current_user is logged in and available to be used for the user_id. Once we refactor this to something like a more specialized slang/meaning route, we can remove that.
Additions:
@annaproxy : Since I've updated the requirements.txt, could you do the same for the environment.yml and see if it works?Thanks.
PS. It also appears that I updated torch to the latest version.
Adding server-side session management with Flask-Session. Two important benefits
Currently the session stores its required files in a flask_session folder which is personal, so no point in committing them to git, hence the update to the .gitignore. Once Redis is also up and running, we can switch the SESSION_TYPE from 'filesystem' to 'redis'.
Moreover I added an @login_required decorator to the index. This is because we currently have functionality in the /index route that assumes a current_user is logged in and available to be used for the user_id. Once we refactor this to something like a more specialized slang/meaning route, we can remove that.
Additions: @annaproxy : Since I've updated the requirements.txt, could you do the same for the environment.yml and see if it works?Thanks. PS. It also appears that I updated torch to the latest version.