flask crud with mysql and deepface as backend
For standalone web service:
Clone this repository
git clone https://github.com/Pritish053/face-analysis.git
cd face-analysis/
Create a new pip environment
python3.8 -m venv env_flask
#just to make sure you have updated version of pip
pip install -U pip
pip install -r requirements.txt
Run with flask.
python api.py
Visit http://localhost:5000
To check whether the ML Service api is working or not (in the case of using third party API for inferencing ) Chnage the IP Address of the API and run
python3 checkMLSERVICE.py
CREATE TABLE `users` (
`id` int NOT NULL AUTO_INCREMENT,
`name` varchar(250) NOT NULL,
`email` varchar(250) NOT NULL,
`photo` varchar(250) NOT NULL,
`time` varchar(255) NOT NULL,
`age` int NOT NULL,
`gender` varchar(250) NOT NULL,
PRIMARY KEY (`id`) );
CREATE TABLE `admin` (
`id` int NOT NULL AUTO_INCREMENT,
`username` varchar(50) NOT NULL,
`password` varchar(255) NOT NULL,
PRIMARY KEY (`id`));
docker build -t faceanalysiswebapp .
docker run -d -p 5000:5000 --name webappfaceanalysis faceanalysiswebapp
# docker stop webappfaceanalysis
Check logs with docker logs:
docker logs webappfaceanalysis