A web app built from a ML model for predicting loan eligibility using a Random Forest model. Built by Zuck30 from Tanzania.
- 🔭 Predicts loan eligibility for students.
- 👨💻 Built with React and FastAPI for a modern, user friendly experience.
- 📊 Provides real time predictions with probability scores.
This project is deployed using a decoupled architecture:
You can deploy your own instance by following the instructions in the render.yaml and netlify.toml files.
Frontend & Backend
Tools
Loan eligibility is a website designed to help Tanzanian students assess their eligibility for loans. Users input details like citizenship, academic performance, and family income, and a pre trained Random Forest model predicts eligibility with a confidence score.
- Intuitive Interface: React-powered form for easy input.
- Real Time Predictions: Instant results with "Eligible" or "Not Eligible" status.
- Probability Scores: Shows confidence in the prediction.
- Tanzanian Focus: Tailored for Tanzania use case
- Python 3.7+
- Node.js and npm
- pip (Python package installer)
-
Clone the repository:
git clone https://github.com/zuck30/loan-eligibility.git cd loan-eligibility -
Backend Setup:
# Create a virtual environment python -m venv venv # Activate it # Windows: .\\venv\\Scripts\\activate # macOS/Linux: source venv/bin/activate # Install dependencies pip install -r api/requirements.txt
-
Frontend Setup:
cd frontend npm install cd ..
To run the application locally, you will need to run the backend and frontend servers in separate terminals.
1. Run the Backend Server:
# From the project root
uvicorn api.main:app --reloadThe backend server will be running at http://localhost:8000.
2. Run the Frontend Server:
# From the project root, in a new terminal
cd frontend
npm run devThe frontend development server will be running at http://localhost:5173. Open this URL in your browser to use the application. The frontend is configured to proxy API requests to the backend server running on port 8000.
This project is licensed under the MIT License, see the LICENSE file for details.
For questions or issues, open a GitHub issue or contact mwalyangashadrack@gmail.com.
