The entire (dockerized) project can be started using the docker compose file. But before it can be run, the docker image has to be built for the backend and frontend. Run the following from the project root directory:
docker build -t iai-frontend frontend/
docker build -t iai-backend backend/Then, the containers can be started with docker-compose up -d.
Installation steps:
pip install Flask
pip install matplotlib
pip install tensorflow
pip install scikit-learn
pip install tensorflow_datasetsTo start flask backend:
flask --app flask-backend/backend.py runAfter running the Flask backend, images to be identified can be uploaded to the endpoint /upload-image with a POST request. The image will be saved in the uploads folder and the prediction will be returned as a JSON response.
Sample curl request:
curl -X POST -F "file=@written-8.png" http://127.0.0.1:5000/upload-image