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.
- 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
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
Follow these steps to run the project locally:
git clone https://github.com/gschandrasekhar/LoanApprovalPrediction.git
cd LoanApprovalPredictionpython -m venv venv
venv\Scripts\activate # On Windowspip install -r requirements.txtIf you don’t have a
requirements.txt, create one with:pip install streamlit scikit-learn numpy joblib pip freeze > requirements.txt
streamlit run app.py-
User Input:
- The user enters details such as Age, Income, Employment Status, Loan Amount, and Loan Purpose.
-
Preprocessing:
- Inputs are encoded and scaled using
LabelEncoderandStandardScaler(same as used during training).
- Inputs are encoded and scaled using
-
Prediction:
- The trained ML model (
loan_approval_model.pkl) predicts whether the loan will be approved.
- The trained ML model (
-
Output:
-
The app displays one of the following messages:
- ✅ "Yes!! you are eligible for the loan"
- ❌ "No!! you are not eligible for the loan"
-
| Category | Tools / Libraries |
|---|---|
| Language | Python |
| Frontend / UI | Streamlit |
| Machine Learning | scikit-learn |
| Data Handling | NumPy, Pandas |
| Model Persistence | Joblib |
| Scaler / Encoder | StandardScaler, LabelEncoder |
- Sidebar: Displays developer info, contact links, and technologies used.
- Main Section: Contains user input fields, prediction button, and result display.
- 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
Siva Chandra Sekhar Guttikonda 💼 LinkedIn 💻 GitHub 📧 Email
This project is licensed under the MIT License — feel free to use, modify, and distribute it for educational purposes.