Skip to content

Clothj/PMLDL_Assignment_1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Titanic Survival Prediction

This repository contains a complete ML project example: model training, REST API, web interface, and deployment via Docker Compose.

Project Structure

├── 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

How to Run

  1. Clone the repository

    git clone <repo_url>
    cd PMLDL_Assignment_1/code/deployment
    
  2. Start services via Docker Compose

    docker-compose up --build
    

    This will start two containers: API (FastAPI) and web app (Streamlit).

  3. Open the web interface
    In your browser, go to:

    http://localhost:8501
    

    Enter 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/.

Parameter Description

  • 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)

Dependencies

All dependencies are listed in the requirements.txt files inside the api and app folders.

Contacts

For questions and suggestions, create an issue or contact via Telegram - @clotjh

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published