Upload 3 files
Browse files- Resources/lending_data.csv +0 -0
- requirements.txt +221 -0
- templates/index.html +112 -0
Resources/lending_data.csv
ADDED
The diff for this file is too large to render.
See raw diff
|
|
requirements.txt
ADDED
@@ -0,0 +1,221 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
absl-py==2.1.0
|
2 |
+
accelerate==0.12.0
|
3 |
+
aiofiles==23.2.1
|
4 |
+
altair==5.4.0
|
5 |
+
annotated-types==0.7.0
|
6 |
+
anyio==4.3.0
|
7 |
+
appnope==0.1.4
|
8 |
+
argon2-cffi==23.1.0
|
9 |
+
argon2-cffi-bindings==21.2.0
|
10 |
+
arrow==1.3.0
|
11 |
+
asttokens==2.4.1
|
12 |
+
astunparse==1.6.3
|
13 |
+
async-lru==2.0.4
|
14 |
+
attrs==23.2.0
|
15 |
+
Babel==2.14.0
|
16 |
+
beautifulsoup4==4.12.3
|
17 |
+
bleach==6.1.0
|
18 |
+
blinker==1.8.2
|
19 |
+
bokeh==3.4.1
|
20 |
+
bs4==0.0.2
|
21 |
+
Cartopy==0.23.0
|
22 |
+
census==0.8.22
|
23 |
+
certifi==2024.2.2
|
24 |
+
cffi==1.16.0
|
25 |
+
charset-normalizer==3.3.2
|
26 |
+
citipy==0.0.6
|
27 |
+
click==8.1.7
|
28 |
+
colorcet==3.1.0
|
29 |
+
comm==0.2.2
|
30 |
+
contourpy==1.2.1
|
31 |
+
cycler==0.12.1
|
32 |
+
debugpy==1.8.1
|
33 |
+
decorator==5.1.1
|
34 |
+
defusedxml==0.7.1
|
35 |
+
dnspython==2.6.1
|
36 |
+
et-xmlfile==1.1.0
|
37 |
+
executing==2.0.1
|
38 |
+
fastapi==0.115.0
|
39 |
+
fastjsonschema==2.19.1
|
40 |
+
ffmpy==0.4.0
|
41 |
+
filelock==3.16.0
|
42 |
+
Flask==3.0.3
|
43 |
+
Flask-Cors==4.0.1
|
44 |
+
flatbuffers==24.3.25
|
45 |
+
fonttools==4.51.0
|
46 |
+
fqdn==1.5.1
|
47 |
+
fsspec==2024.9.0
|
48 |
+
gast==0.6.0
|
49 |
+
geoviews==1.12.0
|
50 |
+
google-pasta==0.2.0
|
51 |
+
gradio==4.44.0
|
52 |
+
gradio_client==1.3.0
|
53 |
+
greenlet==3.0.3
|
54 |
+
grpcio==1.66.1
|
55 |
+
h11==0.14.0
|
56 |
+
h5py==3.11.0
|
57 |
+
holoviews==1.18.3
|
58 |
+
html5lib==1.1
|
59 |
+
httpcore==1.0.5
|
60 |
+
httpx==0.27.0
|
61 |
+
huggingface-hub==0.25.0
|
62 |
+
hvplot==0.10.0
|
63 |
+
idna==3.6
|
64 |
+
importlib_resources==6.4.5
|
65 |
+
ipykernel==6.29.4
|
66 |
+
ipython==8.23.0
|
67 |
+
isoduration==20.11.0
|
68 |
+
itsdangerous==2.2.0
|
69 |
+
jedi==0.19.1
|
70 |
+
Jinja2==3.1.3
|
71 |
+
joblib==1.4.2
|
72 |
+
json5==0.9.24
|
73 |
+
jsonpointer==2.4
|
74 |
+
jsonschema==4.21.1
|
75 |
+
jsonschema-specifications==2023.12.1
|
76 |
+
jupyter-events==0.10.0
|
77 |
+
jupyter-lsp==2.2.4
|
78 |
+
jupyter_client==8.6.1
|
79 |
+
jupyter_core==5.7.2
|
80 |
+
jupyter_server==2.13.0
|
81 |
+
jupyter_server_terminals==0.5.3
|
82 |
+
jupyterlab==4.1.5
|
83 |
+
jupyterlab_pygments==0.3.0
|
84 |
+
jupyterlab_server==2.25.4
|
85 |
+
kdtree==0.16
|
86 |
+
keras==3.5.0
|
87 |
+
keras-tuner==1.4.7
|
88 |
+
kiwisolver==1.4.5
|
89 |
+
kt-legacy==1.0.5
|
90 |
+
libclang==18.1.1
|
91 |
+
linkify-it-py==2.0.3
|
92 |
+
lxml==5.2.2
|
93 |
+
Markdown==3.6
|
94 |
+
markdown-it-py==3.0.0
|
95 |
+
MarkupSafe==2.1.5
|
96 |
+
matplotlib==3.9.0
|
97 |
+
matplotlib-inline==0.1.6
|
98 |
+
mdit-py-plugins==0.4.1
|
99 |
+
mdurl==0.1.2
|
100 |
+
mistune==3.0.2
|
101 |
+
ml-dtypes==0.3.2
|
102 |
+
mpmath==1.3.0
|
103 |
+
namex==0.0.8
|
104 |
+
narwhals==1.5.5
|
105 |
+
nbclient==0.10.0
|
106 |
+
nbconvert==7.16.3
|
107 |
+
nbformat==5.10.3
|
108 |
+
nest-asyncio==1.6.0
|
109 |
+
networkx==3.3
|
110 |
+
nltk==3.9.1
|
111 |
+
notebook==7.1.2
|
112 |
+
notebook_shim==0.2.4
|
113 |
+
numpy==1.26.4
|
114 |
+
openpyxl==3.1.4
|
115 |
+
opt-einsum==3.3.0
|
116 |
+
optree==0.12.1
|
117 |
+
orjson==3.10.7
|
118 |
+
outcome==1.3.0.post0
|
119 |
+
overrides==7.7.0
|
120 |
+
packaging==24.0
|
121 |
+
pandas==2.2.2
|
122 |
+
pandocfilters==1.5.1
|
123 |
+
panel==1.4.4
|
124 |
+
param==2.1.0
|
125 |
+
parso==0.8.3
|
126 |
+
patsy==0.5.6
|
127 |
+
pexpect==4.9.0
|
128 |
+
pillow==10.3.0
|
129 |
+
platformdirs==4.2.0
|
130 |
+
plotly==5.22.0
|
131 |
+
prometheus_client==0.20.0
|
132 |
+
prompt-toolkit==3.0.43
|
133 |
+
protobuf==4.25.5
|
134 |
+
psutil==5.9.8
|
135 |
+
ptyprocess==0.7.0
|
136 |
+
pure-eval==0.2.2
|
137 |
+
pycparser==2.22
|
138 |
+
pydantic==2.9.2
|
139 |
+
pydantic_core==2.23.4
|
140 |
+
pydotplus==2.0.2
|
141 |
+
pydub==0.25.1
|
142 |
+
Pygments==2.17.2
|
143 |
+
pymongo==4.8.0
|
144 |
+
pyparsing==3.1.2
|
145 |
+
pyproj==3.6.1
|
146 |
+
pyshp==2.3.1
|
147 |
+
PySocks==1.7.1
|
148 |
+
python-dateutil==2.9.0.post0
|
149 |
+
python-dotenv==1.0.1
|
150 |
+
python-json-logger==2.0.7
|
151 |
+
python-multipart==0.0.10
|
152 |
+
pytz==2024.1
|
153 |
+
pyviz_comms==3.0.2
|
154 |
+
PyYAML==6.0.1
|
155 |
+
pyzmq==25.1.2
|
156 |
+
referencing==0.34.0
|
157 |
+
regex==2024.7.24
|
158 |
+
requests==2.31.0
|
159 |
+
rfc3339-validator==0.1.4
|
160 |
+
rfc3986-validator==0.1.1
|
161 |
+
rich==13.8.1
|
162 |
+
rpds-py==0.18.0
|
163 |
+
ruff==0.6.7
|
164 |
+
scikit-learn==1.5.0
|
165 |
+
scikit-learn-extra==0.3.0
|
166 |
+
scipy==1.13.1
|
167 |
+
seaborn==0.13.2
|
168 |
+
selenium==4.21.0
|
169 |
+
semantic-version==2.10.0
|
170 |
+
Send2Trash==1.8.2
|
171 |
+
setuptools==75.1.0
|
172 |
+
shapely==2.0.4
|
173 |
+
shellingham==1.5.4
|
174 |
+
six==1.16.0
|
175 |
+
sniffio==1.3.1
|
176 |
+
sortedcontainers==2.4.0
|
177 |
+
soupsieve==2.5
|
178 |
+
splinter==0.21.0
|
179 |
+
SQLAlchemy==2.0.31
|
180 |
+
stack-data==0.6.3
|
181 |
+
starlette==0.38.6
|
182 |
+
statsmodels==0.14.2
|
183 |
+
sympy==1.13.2
|
184 |
+
tabulate==0.9.0
|
185 |
+
tenacity==8.4.1
|
186 |
+
tensorboard==2.16.2
|
187 |
+
tensorboard-data-server==0.7.2
|
188 |
+
tensorflow==2.16.2
|
189 |
+
termcolor==2.4.0
|
190 |
+
terminado==0.18.1
|
191 |
+
textblob==0.18.0.post0
|
192 |
+
threadpoolctl==3.5.0
|
193 |
+
tinycss2==1.2.1
|
194 |
+
tomlkit==0.12.0
|
195 |
+
torch==2.2.2
|
196 |
+
tornado==6.4
|
197 |
+
tqdm==4.66.4
|
198 |
+
traitlets==5.14.2
|
199 |
+
trio==0.25.1
|
200 |
+
trio-websocket==0.11.1
|
201 |
+
typer==0.12.5
|
202 |
+
types-python-dateutil==2.9.0.20240316
|
203 |
+
typing_extensions==4.12.1
|
204 |
+
tzdata==2024.1
|
205 |
+
uc-micro-py==1.0.3
|
206 |
+
uri-template==1.3.0
|
207 |
+
urllib3==2.2.1
|
208 |
+
uvicorn==0.30.6
|
209 |
+
wcwidth==0.2.13
|
210 |
+
webcolors==1.13
|
211 |
+
webencodings==0.5.1
|
212 |
+
websocket-client==1.7.0
|
213 |
+
websockets==12.0
|
214 |
+
Werkzeug==3.0.3
|
215 |
+
wheel==0.44.0
|
216 |
+
wordcloud==1.9.3
|
217 |
+
wrapt==1.16.0
|
218 |
+
wsproto==1.2.0
|
219 |
+
xyzservices==2024.4.0
|
220 |
+
|
221 |
+
|
templates/index.html
ADDED
@@ -0,0 +1,112 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!DOCTYPE html>
|
2 |
+
<html lang="en">
|
3 |
+
|
4 |
+
<head>
|
5 |
+
<meta charset="UTF-8">
|
6 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
7 |
+
<title>Loan Status Prediction</title>
|
8 |
+
<!-- Bootstrap CSS -->
|
9 |
+
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
|
10 |
+
<style>
|
11 |
+
body {
|
12 |
+
background-color: #f8f9fa;
|
13 |
+
font-family: Arial, sans-serif;
|
14 |
+
padding: 20px;
|
15 |
+
}
|
16 |
+
|
17 |
+
.container {
|
18 |
+
max-width: 600px;
|
19 |
+
background-color: #fff;
|
20 |
+
padding: 20px;
|
21 |
+
border-radius: 8px;
|
22 |
+
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
|
23 |
+
}
|
24 |
+
|
25 |
+
.form-label {
|
26 |
+
font-weight: bold;
|
27 |
+
}
|
28 |
+
|
29 |
+
.btn-primary {
|
30 |
+
background-color: #3f51b5;
|
31 |
+
border-color: #3f51b5;
|
32 |
+
}
|
33 |
+
|
34 |
+
.btn-primary:hover {
|
35 |
+
background-color: #5c6bc0;
|
36 |
+
border-color: #5c6bc0;
|
37 |
+
}
|
38 |
+
|
39 |
+
h1 {
|
40 |
+
font-size: 24px;
|
41 |
+
margin-bottom: 20px;
|
42 |
+
color: #3f51b5;
|
43 |
+
}
|
44 |
+
|
45 |
+
.prediction-result {
|
46 |
+
margin-top: 20px;
|
47 |
+
padding: 10px;
|
48 |
+
border-radius: 8px;
|
49 |
+
font-weight: bold;
|
50 |
+
font-size: 18px;
|
51 |
+
text-align: center;
|
52 |
+
}
|
53 |
+
|
54 |
+
.result-healthy {
|
55 |
+
background-color: #d4edda;
|
56 |
+
color: #155724;
|
57 |
+
}
|
58 |
+
|
59 |
+
.result-risk {
|
60 |
+
background-color: #f8d7da;
|
61 |
+
color: #721c24;
|
62 |
+
}
|
63 |
+
</style>
|
64 |
+
</head>
|
65 |
+
|
66 |
+
<body>
|
67 |
+
<div class="container">
|
68 |
+
<h1>Loan Status Prediction</h1>
|
69 |
+
<form action="/predict" method="post">
|
70 |
+
<div class="mb-3">
|
71 |
+
<label for="loan_size" class="form-label">Loan Size</label>
|
72 |
+
<input type="number" step="any" class="form-control" name="loan_size" required>
|
73 |
+
</div>
|
74 |
+
<div class="mb-3">
|
75 |
+
<label for="interest_rate" class="form-label">Interest Rate</label>
|
76 |
+
<input type="number" step="any" class="form-control" name="interest_rate" required>
|
77 |
+
</div>
|
78 |
+
<div class="mb-3">
|
79 |
+
<label for="borrower_income" class="form-label">Borrower Income</label>
|
80 |
+
<input type="number" step="any" class="form-control" name="borrower_income" required>
|
81 |
+
</div>
|
82 |
+
<div class="mb-3">
|
83 |
+
<label for="debt_to_income" class="form-label">Debt-to-Income Ratio</label>
|
84 |
+
<input type="number" step="any" class="form-control" name="debt_to_income" required>
|
85 |
+
</div>
|
86 |
+
<div class="mb-3">
|
87 |
+
<label for="num_of_accounts" class="form-label">Number of Accounts</label>
|
88 |
+
<input type="number" class="form-control" name="num_of_accounts" required>
|
89 |
+
</div>
|
90 |
+
<div class="mb-3">
|
91 |
+
<label for="derogatory_marks" class="form-label">Derogatory Marks</label>
|
92 |
+
<input type="number" class="form-control" name="derogatory_marks" required>
|
93 |
+
</div>
|
94 |
+
<div class="mb-3">
|
95 |
+
<label for="total_debt" class="form-label">Total Debt</label>
|
96 |
+
<input type="number" step="any" class="form-control" name="total_debt" required>
|
97 |
+
</div>
|
98 |
+
<button type="submit" class="btn btn-primary w-100">Predict</button>
|
99 |
+
</form>
|
100 |
+
|
101 |
+
{% if prediction_text %}
|
102 |
+
<div class="prediction-result {{ 'result-healthy' if 'Healthy' in prediction_text else 'result-risk' }}">
|
103 |
+
{{ prediction_text }}
|
104 |
+
</div>
|
105 |
+
{% endif %}
|
106 |
+
</div>
|
107 |
+
|
108 |
+
<!-- Bootstrap JS (Optional) -->
|
109 |
+
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
|
110 |
+
</body>
|
111 |
+
|
112 |
+
</html>
|