Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -108,41 +108,41 @@ with App:
|
|
108 |
print('Account Cluser Status : ', prediction)
|
109 |
print("\n----------------\n")
|
110 |
for index, values in input.iterrows():
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
|
148 |
|
|
|
108 |
print('Account Cluser Status : ', prediction)
|
109 |
print("\n----------------\n")
|
110 |
for index, values in input.iterrows():
|
111 |
+
for idx_ps, val_ps in pension.iterrows():
|
112 |
+
if values['cluster'] == val_ps['Cluster']:
|
113 |
+
print(f'For account : ', values['account_id'])
|
114 |
+
print('Based on the client characteristic, here are the pension package product to offer :\n')
|
115 |
+
print(f"Product Name: {val_ps['Product Name']} \n")
|
116 |
+
val_ps_def = val_ps['Features'].split(',')
|
117 |
+
print(f'Features :\n')
|
118 |
+
for i in val_ps_def:
|
119 |
+
i = i.strip(" '\"[]")
|
120 |
+
print('*', i)
|
121 |
+
# Print a separator
|
122 |
+
print("\n----------------\n")
|
123 |
+
for idx_iv, val_iv in investment.iterrows():
|
124 |
+
if values['cluster'] == val_iv['Cluster']:
|
125 |
+
print(f'For account : ', values['account_id'])
|
126 |
+
print('Based on the client characteristic, here are the investment package product to offer :\n')
|
127 |
+
print(f"Product Name: {val_iv['Product Name']} \n")
|
128 |
+
val_iv_def = val_iv['Features'].split(',')
|
129 |
+
print(f'Features :\n')
|
130 |
+
for h in val_iv_def:
|
131 |
+
h = h.strip(" '\"[]")
|
132 |
+
print('*', h)
|
133 |
+
# Print a separator
|
134 |
+
print("\n----------------\n")
|
135 |
+
for idx_mg, val_mg in mortgage.iterrows():
|
136 |
+
if values['cluster'] == val_mg['Cluster']:
|
137 |
+
print(f'For account : ', values['account_id'])
|
138 |
+
print('Based on the client characteristic, here are the mortgage package product to offer :\n')
|
139 |
+
print(f"Product Name: {val_mg['Product Name']} \n")
|
140 |
+
val_mg_def = val_mg['Features'].split(',')
|
141 |
+
print(f'Features :\n')
|
142 |
+
for j in val_mg_def:
|
143 |
+
j = j.strip(" '\"[]")
|
144 |
+
print('*', j)
|
145 |
+
# Print a separator
|
146 |
+
print("\n----------------\n")
|
147 |
|
148 |
|