Skip to content

About

Machine learning Streamlit app that predicts EMI eligibility, safe monthly EMI, and applicant risk using customer finance and credit data.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

EMIPredict AI

Real-world style machine learning application for EMI eligibility classification and maximum monthly EMI prediction.

What This App Does

EMIPredict AI helps evaluate loan or EMI applications using customer profile, income, expense, credit, and requested loan details.

The Streamlit app includes:

  • Dashboard for portfolio overview and model readiness.
  • Single applicant prediction with eligibility, safe EMI, risk signals, policy checks, and stress testing.
  • Batch scoring from CSV upload.
  • Saved application queue with approval/manual-review/decline filters.
  • Model performance and EDA views.
  • MLflow experiment summary.

Project Flow

  1. Clean the raw EMI dataset.
  2. Perform exploratory data analysis.
  3. Engineer financial risk features.
  4. Train classification models for emi_eligibility.
  5. Train regression models for max_monthly_emi.
  6. Track experiments with MLflow.
  7. Deploy the Streamlit app from GitHub.

Local Setup

For running only the Streamlit app:

python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
streamlit run app.py

For the full ML pipeline, including training and MLflow:

pip install -r requirements-dev.txt

On macOS, XGBoost may also require:

brew install libomp

Streamlit Cloud Deployment

Use this repository setup:

  • App entrypoint: streamlit_app.py
  • Python dependencies: requirements.txt
  • Linux dependency for XGBoost: packages.txt
  • Streamlit theme: .streamlit/config.toml
  • Required model files: models/
  • Required report files: reports/tables/

In Streamlit Community Cloud:

  1. Push this project to GitHub.
  2. Open https://share.streamlit.io.
  3. Click Create app.
  4. Select the GitHub repository and branch.
  5. Set the main file path to streamlit_app.py.
  6. In Advanced settings, choose Python 3.12.
  7. Deploy.

GitHub Commands

If this folder is not already a Git repository:

git init
git add .
git commit -m "Prepare EMIPredict AI for Streamlit deployment"
git branch -M main
git remote add origin https://github.com/YOUR_USERNAME/emipredict-ai.git
git push -u origin main

Replace YOUR_USERNAME and repository name with your actual GitHub details.

Important Deployment Notes

  • Do not commit the large raw CSV dataset; it is ignored in .gitignore.
  • The deployed app uses the already-trained models in models/.
  • Local MLflow files such as mlflow.db, mlruns/, and mlartifacts/ are ignored because they are not needed by Streamlit Cloud.
  • Saved applications in the deployed app use the app container filesystem and may reset when the app restarts.

Run The ML Pipeline

Preprocess data:

python src/preprocess_data.py

Run EDA:

python src/eda_analysis.py

Train models:

python src/train_models.py

Train on the full cleaned dataset:

python src/train_models.py --sample-size 0

Open the local MLflow dashboard:

mlflow ui --backend-store-uri sqlite:///mlflow.db

Targets

  • Classification target: emi_eligibility
  • Regression target: max_monthly_emi

About

Machine learning Streamlit app that predicts EMI eligibility, safe monthly EMI, and applicant risk using customer finance and credit data.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages