Skip to content

gschandrasekhar/CSILoanPredictionModel

Repository files navigation

CSILoanPredictionModel

Loan Approval Prediction System using Streamlit & Machine Learning

This project is an interactive web application built using Streamlit that predicts whether a loan application will be approved or not based on user-provided financial and personal details.

It uses a pre-trained machine learning model (loan_approval_model.pkl) and a scaler (loan_approval_scaler.pkl) to process and predict outcomes in real time.


Features

  • Predicts loan approval status using a pre-trained ML model
  • Interactive user interface built with Streamlit
  • Real-time input scaling and encoding using scikit-learn
  • Uses LabelEncoder and StandardScaler for preprocessing
  • Customized sidebar with contact and project details

Project Structure

LoanApprovalPrediction/
│
├── loan_approval_model.pkl          # Trained ML model
├── loan_approval_scaler.pkl         # StandardScaler used during training
├── app.py                           # Main Streamlit app code
├── requirements.txt                 # Dependencies
├── README.md                        # Project documentation
└── celebal label cover picture.png  # Sidebar image

Installation and Setup

Follow these steps to run the project locally:

Clone the Repository

git clone https://github.com/gschandrasekhar/LoanApprovalPrediction.git
cd LoanApprovalPrediction

Create a Virtual Environment (optional but recommended)

python -m venv venv
venv\Scripts\activate       # On Windows

Install Required Libraries

pip install -r requirements.txt

If you don’t have a requirements.txt, create one with:

pip install streamlit scikit-learn numpy joblib
pip freeze > requirements.txt

Run the Streamlit App

streamlit run app.py

How It Works

  1. User Input:

    • The user enters details such as Age, Income, Employment Status, Loan Amount, and Loan Purpose.
  2. Preprocessing:

    • Inputs are encoded and scaled using LabelEncoder and StandardScaler (same as used during training).
  3. Prediction:

    • The trained ML model (loan_approval_model.pkl) predicts whether the loan will be approved.
  4. Output:

    • The app displays one of the following messages:

      • "Yes!! you are eligible for the loan"
      • "No!! you are not eligible for the loan"

Tech Stack

Category Tools / Libraries
Language Python
Frontend / UI Streamlit
Machine Learning scikit-learn
Data Handling NumPy, Pandas
Model Persistence Joblib
Scaler / Encoder StandardScaler, LabelEncoder

UI Overview

  • Sidebar: Displays developer info, contact links, and technologies used.
  • Main Section: Contains user input fields, prediction button, and result display.

Future Improvements

  • Add more real-world financial features (credit score, loan history, etc.)
  • Integrate a database to log user predictions
  • Deploy on Streamlit Cloud / Hugging Face Spaces
  • Add data visualizations for loan trends

👨‍💻 Author

Siva Chandra Sekhar Guttikonda 💼 LinkedIn 💻 GitHub 📧 Email


🪪 License

This project is licensed under the MIT License — feel free to use, modify, and distribute it for educational purposes.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published