The database was built using postgres and hosted in docker. import psycopg2 to connect the database in python. Read more about postgres in the docs.
Follow the instructions in the database docs to create a docker container with all the data.
The add data file inserts the data in the database. Change the information to be inserted into the db to change use
First enter cd backend/database/db
then simply enter docker build -t healthvisordb ./
Finally docker run -d --name healthvisordb-container -p 5432:5432 healthvisordb
Make sure to run the python file to add the data:
cd db_data_setup
python add_data.py
docker stop healthvisordb-container
docker run -d --name healthvisordb-container -p 5432:5432 hvdatabaseimg
Start the docker container to start the database. Docker desktop was used for the database
Enter the terminal
enter cd backend/flask
enter python server.py
Download requirements: view imports
Flask may throw a modulenotfound OSError. Simply restart the computer to get rid of temp files and follow the instructions to start the API
The models were built using tensorflow.
To generate a model, open the Condition prediction File and simply run every cell. The model will be generated and the files can be moved to the flask api folder where the current model files are located
This model uses BERT for text-sentiment analysis. The outputs of BERT are then fed to a neural network to predict one of 41 different conditions.
The model has an acuracy of over 99%.
Based on your network, the Flask API URL will change, so be sure to change the API url in the Prediction Analysis File in line 13
and in the Input Box File in line 39