This repository contains a complete ML project example: model training, REST API, web interface, and deployment via Docker Compose.
├── code
│ ├── datasets # source datasets
│ ├── models # model training scripts
│ └── deployment
│ ├── api # FastAPI server for the model
│ └── app # Streamlit web application
├── data # (optional) for storing data
├── models # serialized trained model
-
Clone the repository
git clone <repo_url> cd PMLDL_Assignment_1/code/deployment -
Start services via Docker Compose
docker-compose up --buildThis will start two containers: API (FastAPI) and web app (Streamlit).
-
Open the web interface
In your browser, go to:http://localhost:8501Enter passenger parameters and get the prediction.
Note: If you want to retrain the model, run python train_model.py in code/models/ and replace the file in models/.
- Pclass — ticket class (1, 2, 3)
- Sex — gender (male/female)
- Age — age
- SibSp — number of siblings and spouses aboard
- Parch — number of parents and children aboard
- Fare — ticket fare
- Embarked — port of embarkation (S — Southampton, C — Cherbourg, Q — Queenstown)
All dependencies are listed in the requirements.txt files inside the api and app folders.
For questions and suggestions, create an issue or contact via Telegram - @clotjh