To run the above python code add .env file to outer directory and run app.py.
Using localhost with user as "root" and password as "". Create database with name "face_reco" and table with name "infos".
SECRET_KEY = "yashdmeniax"
CURSOR_CLASS = "DictCursor"
UPLOAD_FOLDER = "static/uploads/"
DB_FOLDER = "static/dbimages/"
HOST = "localhost"
USER = "root"
PASSWORD = ""
DATABASE = "face_reco"