{"id":25390058,"url":"https://github.com/nk-works/credit-underwriting","last_synced_at":"2025-04-09T22:52:43.236Z","repository":{"id":275431538,"uuid":"926050859","full_name":"NK-Works/Credit-Underwriting","owner":"NK-Works","description":null,"archived":false,"fork":false,"pushed_at":"2025-02-11T19:55:16.000Z","size":14159,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-09T22:52:39.467Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NK-Works.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-02-02T12:38:08.000Z","updated_at":"2025-02-11T19:55:20.000Z","dependencies_parsed_at":null,"dependency_job_id":"589f3045-9285-4dc7-85d2-5d04de67be37","html_url":"https://github.com/NK-Works/Credit-Underwriting","commit_stats":null,"previous_names":["nk-works/credit-underwriting"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NK-Works%2FCredit-Underwriting","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NK-Works%2FCredit-Underwriting/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NK-Works%2FCredit-Underwriting/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NK-Works%2FCredit-Underwriting/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NK-Works","download_url":"https://codeload.github.com/NK-Works/Credit-Underwriting/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248125640,"owners_count":21051766,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-02-15T14:34:58.826Z","updated_at":"2025-04-09T22:52:43.207Z","avatar_url":"https://github.com/NK-Works.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AI Predictive Methods for Credit Underwriting\n\nThis project is a **Streamlit-based AI Predictive Methods for Credit Underwriting** application that utilizes a machine learning model to predict whether a loan application will be **approved or rejected** based on user-provided inputs. The app also generates a **downloadable PDF report** with detailed results and insights.\n\n## Features\n\n- **Interactive Web App**: Built with Streamlit for an intuitive and responsive user interface.\n- **User Inputs**: Fields for CIBIL score, income, loan amount, loan term, and more.\n- **Prediction Model**: Uses a pre-trained machine learning model to determine loan approval status.\n- **Downloadable Report**: Generates a professional **PDF report** summarizing predictions and user inputs.\n- **EMI Calculator**: Calculate monthly EMI based on loan amount, interest rate, and term.\n- **AI Chatbot**: Provides financial advice and helps users with loan-related queries.\n- **Enhanced Styling**: Custom CSS for a better user experience.\n\n## Technologies Used\n\n- **Python**: Programming language for building the application.\n- **Streamlit**: Framework for creating the interactive web app.\n- **FPDF**: Library for generating downloadable PDF reports.\n- **pandas**: For data preparation and handling user inputs.\n- **matplotlib**: For optional visualizations.\n- **joblib**: For loading the pre-trained machine learning model.\n- **transformers**: For NLP-based chatbot responses (using pre-trained models).\n- **langdetect**: For language detection (used in the chatbot).\n\n## Prerequisites\n\nEnsure you have the following installed on your system:\n\n- **Python 3.7+**\n- **pip (Python package manager)**\n\n### Install Dependencies\nRun the following command to install all required libraries:\n\n```bash\npip install -r requirements.txt\n```\n\n### `requirements.txt` File Contains:\n```\nstreamlit\npandas\nmatplotlib\njoblib\nfpdf2\ntransformers\nlangdetect\n```\n\n## How to Run\n\n### Clone the Repository:\n```bash\ngit clone https://github.com/Nk-Works/Credit-Underwriting.git\ncd Credit-Underwriting\n```\n\n### Install Dependencies:\n```bash\npip install -r requirements.txt\n```\n\n### Run the Application:\n```bash\nstreamlit run streamlit_app.py\n```\n\nOpen the provided **local URL** in your browser to access the app.\n\n## File Structure\n\n```\n├── streamlit_app.py  # Main application file\n├── requirements.txt  # List of required Python libraries\n├── best_features_model.pkl  # Pre-trained machine learning model file\n├── FreeSerif.ttf  # Font for generating PDF reports (ensure this font is available)\n```\n\n## User Inputs\n\nThe app provides the following input fields in the sidebar:\n\n- **CIBIL Score** (300-900)\n- **Annual Income** (INR)\n- **Loan Amount** (INR)\n- **Loan Term** (months)\n- **Number of Active Loans**\n- **Gender**\n- **Marital Status**\n- **Employment Status**\n- **Residence Type**\n- **Loan Purpose**\n\n## Output\n\n- **Loan Status**: Displays whether the loan is **Approved** or **Rejected**.\n- **Prediction Probabilities**: Shows the probability of approval and rejection.\n- **Downloadable PDF Report**:\n  - Prediction results.\n  - Input details provided by the user.\n  - Summary of probabilities.\n\n## Deployment\n\nThe application is live and can be accessed at:\n[AI Predictive Methods for Credit Underwriting](https://ai-predictive-methods-for-credit-underwriting-csu8gym5fctrsyru.streamlit.app/)\n\nThe presentation for the applicaiton can be accessed at: \n[AI Predictive Model Presentation](https://www.canva.com/design/DAGd4QHNyMw/PqKP2SuqxH5LwEoZloEbwg/view?utm_content=DAGd4QHNyMw\u0026utm_campaign=designshare\u0026utm_medium=link2\u0026utm_source=uniquelinks\u0026utlId=h0d00988ec0)\n\nThe video for the application can be accessed at:\n[AI Predictive Model Video](https://drive.google.com/file/d/1PLPSnALRIIDETuAmN2-EdO5o5C75K07T/view?usp=sharing)\n\nTo deploy the app on **Streamlit Cloud**:\n\nTo deploy the app on **Streamlit Cloud**:\n\n1. **Push the project to GitHub.**\n2. **Connect your GitHub repository to Streamlit Cloud.**\n3. **Ensure `requirements.txt` is present for dependency installation.**\n4. **Deploy and access your app via the Streamlit Cloud link.**\n\n## Troubleshooting\n\n### Missing Library Error\nIf you encounter an error like `ModuleNotFoundError: No module named 'fpdf'`, install it manually:\n```bash\npip install fpdf\n```\n\n### Unicode Character Error (₹ Symbol)\nEnsure you have a Unicode-compatible font (e.g., `FreeSerif.ttf`) in your working directory. Update the PDF font registration in the code if necessary.\n\n## License\n\nThis project is licensed under the **MIT License**. See the `LICENSE` file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnk-works%2Fcredit-underwriting","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnk-works%2Fcredit-underwriting","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnk-works%2Fcredit-underwriting/lists"}