-
Notifications
You must be signed in to change notification settings - Fork 1
Architecture
The project is split into two repositories backend
and frontend
. The backend
is threefold. It contains jupyter notebooks to learn a price prediction model, a setup to initialize a database with airbnb data and a flask api to expose for the consuming frontend. The frontend
serves to be the visualisation of the airbnb data in filtered form or as a heat map and provide an interface to get price predictions.
Note: The application is built and run in docker containers. Every part of the backend and the frontend has a respective
Dockerfile
file that serves to build an image of the application and publish it. The repositorybackend
containsdocker-compose
files that can utilise these published images to start up the full application with the published images.
The backend contains three main partitions:
api/
db/
tensorflow/
The folder api/
is split into the actual code (code/
) and unit tests (tests/
). The folder code/
contains the models (encoders/
) and the flask project (flaskr/
). The built in Swagger UI provides a detailed API documentation.
The folder db/
contains the necessary files to build a MongoDB docker container and a separate container to seed the data (present in this folder) to this mongoDB container. Since a mongoDB as a container cannot be built with loaded data, the data needs to be seeded into the started up empty mongoDB container. This is done with the docker file Dockerfile.seed
upon starting the application with the provided docker-compose
files.
The folder tensorflow/
is used to build the price prediction model for this project. It contains the jupyter notebook price_predictor.ipynb
that can be used to feed airbnb data, train a model and create a pickle file that can then be added to the api/code/encoders/
directory to be consumed by the flask api.
Have a look in the separate frontend wiki.