Update README.md
Browse files
README.md
CHANGED
|
@@ -1,6 +1,12 @@
|
|
| 1 |
---
|
| 2 |
license: mit
|
| 3 |
pipeline_tag: text-classification
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
---
|
| 5 |
# Nexus Bank Loan Default Prediction Model
|
| 6 |
|
|
@@ -21,37 +27,4 @@ To use the model, you can input the salary and number of dependents of a custome
|
|
| 21 |
|
| 22 |
## Data Source
|
| 23 |
|
| 24 |
-
The data used for training this model was obtained from Nexus Bank.
|
| 25 |
-
|
| 26 |
-
import pandas as pd
|
| 27 |
-
import numpy as np
|
| 28 |
-
import seaborn as sns
|
| 29 |
-
import matplotlib.pyplot as plt
|
| 30 |
-
%matplotlib inline
|
| 31 |
-
nexus_bank = pd.read_csv('nexus_bank_dataa.csv')
|
| 32 |
-
nexus_bank.head()
|
| 33 |
-
from sklearn.model_selection import train_test_split
|
| 34 |
-
X_train, X_test, y_train, y_test = train_test_split( X, y, test_size=0.15, random_state=90)
|
| 35 |
-
from sklearn.neighbors import KNeighborsClassifier
|
| 36 |
-
knn_classifier =KNeighborsClassifier()
|
| 37 |
-
knn_classifier.fit(X_train,y_train)
|
| 38 |
-
knn_predict = knn_classifier.predict(X_test)
|
| 39 |
-
knn_predict
|
| 40 |
-
import gradio as gr
|
| 41 |
-
|
| 42 |
-
# Prediction function
|
| 43 |
-
def predict_defaulter(salary, dependents):
|
| 44 |
-
input_data = [[salary, dependents]]
|
| 45 |
-
knn_predict = knn_classifier.predict(input_data)
|
| 46 |
-
return "Yes! its Defaulter" if knn_predict[0] == 1 else "No! its not Defaulter"
|
| 47 |
-
|
| 48 |
-
# Interface
|
| 49 |
-
interface = gr.Interface(
|
| 50 |
-
fn=predict_defaulter,
|
| 51 |
-
inputs=["number", "number"],
|
| 52 |
-
outputs="text",
|
| 53 |
-
title="Defaulter Prediction"
|
| 54 |
-
)
|
| 55 |
-
|
| 56 |
-
# Launch the interface
|
| 57 |
-
interface.launch()
|
|
|
|
| 1 |
---
|
| 2 |
license: mit
|
| 3 |
pipeline_tag: text-classification
|
| 4 |
+
datasets:
|
| 5 |
+
- HuggingFaceTB/cosmopedia
|
| 6 |
+
metrics:
|
| 7 |
+
- accuracy
|
| 8 |
+
tags:
|
| 9 |
+
- finance
|
| 10 |
---
|
| 11 |
# Nexus Bank Loan Default Prediction Model
|
| 12 |
|
|
|
|
| 27 |
|
| 28 |
## Data Source
|
| 29 |
|
| 30 |
+
The data used for training this model was obtained from Nexus Bank.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|