Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -20,7 +20,7 @@ background-color: rgba(0,0,0,0);
|
|
| 20 |
|
| 21 |
"""
|
| 22 |
|
| 23 |
-
Home, App = st.tabs(['Home','App'])
|
| 24 |
|
| 25 |
with Home:
|
| 26 |
st.title("Final Project - Uncover potential insights 1999 Czech Bank Financial Dataset ")
|
|
@@ -147,5 +147,45 @@ with App:
|
|
| 147 |
print('*', j)
|
| 148 |
# Print a separator
|
| 149 |
print("\n----------------\n")
|
| 150 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 151 |
|
|
|
|
| 20 |
|
| 21 |
"""
|
| 22 |
|
| 23 |
+
Home, App, Result = st.tabs(['Home','App','Result'])
|
| 24 |
|
| 25 |
with Home:
|
| 26 |
st.title("Final Project - Uncover potential insights 1999 Czech Bank Financial Dataset ")
|
|
|
|
| 147 |
print('*', j)
|
| 148 |
# Print a separator
|
| 149 |
print("\n----------------\n")
|
| 150 |
+
|
| 151 |
+
with Result:
|
| 152 |
+
print('Account Cluser Status : ', prediction)
|
| 153 |
+
print("\n----------------\n")
|
| 154 |
+
for index, values in input.iterrows():
|
| 155 |
+
for idx_ps, val_ps in pension.iterrows():
|
| 156 |
+
if values['cluster'] == val_ps['Cluster']:
|
| 157 |
+
print(f'For account : ', values['account_id'])
|
| 158 |
+
print('Based on the client characteristic, here are the pension package product to offer :\n')
|
| 159 |
+
print(f"Product Name: {val_ps['Product Name']} \n")
|
| 160 |
+
val_ps_def = val_ps['Features'].split(',')
|
| 161 |
+
print(f'Features :\n')
|
| 162 |
+
for i in val_ps_def:
|
| 163 |
+
i = i.strip(" '\"[]")
|
| 164 |
+
print('*', i)
|
| 165 |
+
# Print a separator
|
| 166 |
+
print("\n----------------\n")
|
| 167 |
+
for idx_iv, val_iv in investment.iterrows():
|
| 168 |
+
if values['cluster'] == val_iv['Cluster']:
|
| 169 |
+
print(f'For account : ', values['account_id'])
|
| 170 |
+
print('Based on the client characteristic, here are the investment package product to offer :\n')
|
| 171 |
+
print(f"Product Name: {val_iv['Product Name']} \n")
|
| 172 |
+
val_iv_def = val_iv['Features'].split(',')
|
| 173 |
+
print(f'Features :\n')
|
| 174 |
+
for h in val_iv_def:
|
| 175 |
+
h = h.strip(" '\"[]")
|
| 176 |
+
print('*', h)
|
| 177 |
+
# Print a separator
|
| 178 |
+
print("\n----------------\n")
|
| 179 |
+
for idx_mg, val_mg in mortgage.iterrows():
|
| 180 |
+
if values['cluster'] == val_mg['Cluster']:
|
| 181 |
+
print(f'For account : ', values['account_id'])
|
| 182 |
+
print('Based on the client characteristic, here are the mortgage package product to offer :\n')
|
| 183 |
+
print(f"Product Name: {val_mg['Product Name']} \n")
|
| 184 |
+
val_mg_def = val_mg['Features'].split(',')
|
| 185 |
+
print(f'Features :\n')
|
| 186 |
+
for j in val_mg_def:
|
| 187 |
+
j = j.strip(" '\"[]")
|
| 188 |
+
print('*', j)
|
| 189 |
+
# Print a separator
|
| 190 |
+
print("\n----------------\n")
|
| 191 |
|