Retain is a classification app scaffold: it trains a scikit-learn/XGBoost model on a
generated sample dataset (src/data_generator.py → src/train.py) and serves live
predictions through a small Streamlit UI (src/app.py).
Dependencies (requirements.txt):
pandas>=1.3.0
numpy>=1.21.0
scikit-learn>=1.0
streamlit>=1.20.0
pyyaml>=6.0
joblib>=1.2.0
xgboost>=1.5.0
Retain/
├── configs/config.yaml # Data paths & model hyperparameters
├── data/external/ # Generated sample dataset
├── models/ # Trained model artifact (.pkl)
├── notebooks/ # Exploratory notebooks
├── src/
│ ├── app.py # Streamlit UI — loads the trained model and predicts
│ ├── train.py # Trains the model from configs/config.yaml
│ ├── data_generator.py # Generates the sample dataset
│ ├── features/ # Feature engineering
│ ├── models/ # Model definitions
│ └── visualization/ # Plotting helpers
└── tests/
git clone https://github.com/AfnanSharif/Retain.git
cd Retain
python -m venv venv
venv\Scripts\activate
pip install -r requirements.txt
python src/train.py
streamlit run src/app.pygit clone https://github.com/AfnanSharif/Retain.git
cd Retain
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
python src/train.py
streamlit run src/app.pyOpen http://localhost:8501.
Created by AfnanSharif · ⭐ star this repo if it helped you