In this repository you will find an implementation for listing price of Airbnb homes using Inside Airbnb dataset. The project is structured in two parts:
- EDA and Model training using a Streamlit front.
- FastAPI microservice for serving inference in the front.
The Streamlit front is structured in the src
folder with one script per navigation section:
- EDA:
src/eda.py
. - Model Training:
src/training.py
. - Model deployment:
src/price_predict.py
The prediction microservice is structured in the prediction-service/app
folder:
- API specification and implementation:
app/api
- Core functionality:
src/core
- Request schemas:
src/models
- Inference implementation:
src/services
For executing the Streamlit app:
- Python 3.8+ installation.
- Clone the repository:
git clone <repository>
. - Go the repository:
cd airbnb-listing-price-prediction
. - Create a venv:
python -m venv venv
. - Install dependencies:
pip install -r requirements.txt
. - Execute:
streamlit run app.py --server.headless true
. - Go to the URL Streamlit gives you.
- Have fun!
For executing the FastAPI microservice:
- Python 3.8+ installation.
- Clone the repository:
git clone <repository>
. - Go the repository:
cd airbnb-listing-price-prediction/prediction-service
. - Create a venv:
python -m venv venv
. - Install dependencies:
pip install -r requirements.txt
. - Set environment variable:
export DEFAULT_MODEL_PATH="gs://keepler-inference-models/"
. - Execute:
uvicorn app.main:app
. - Go to:
http://127.0.0.1:8000
. - Have fun!