Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -116,14 +116,14 @@ with App:
|
|
| 116 |
st.write('Based on user input, the placement cluster: Low-Risk Customers')
|
| 117 |
elif np.all(labelz == 2):
|
| 118 |
st.write('Based on user input, the placement cluster: High-Risk Customers')
|
| 119 |
-
label_pred = pd.DataFrame(labelz)
|
| 120 |
input_pred = pd.concat([label_pred.reset_index(drop=True), input], axis=1)
|
| 121 |
input_pred.rename(columns={0: "cluster"}, inplace=True)
|
| 122 |
|
| 123 |
|
| 124 |
|
| 125 |
if st.button('predict'):
|
| 126 |
-
prediction = model.predict(
|
| 127 |
|
| 128 |
if prediction == 0:
|
| 129 |
prediction = ' Rejected'
|
|
|
|
| 116 |
st.write('Based on user input, the placement cluster: Low-Risk Customers')
|
| 117 |
elif np.all(labelz == 2):
|
| 118 |
st.write('Based on user input, the placement cluster: High-Risk Customers')
|
| 119 |
+
return label_pred = pd.DataFrame(labelz)
|
| 120 |
input_pred = pd.concat([label_pred.reset_index(drop=True), input], axis=1)
|
| 121 |
input_pred.rename(columns={0: "cluster"}, inplace=True)
|
| 122 |
|
| 123 |
|
| 124 |
|
| 125 |
if st.button('predict'):
|
| 126 |
+
prediction = model.predict(input_pred)
|
| 127 |
|
| 128 |
if prediction == 0:
|
| 129 |
prediction = ' Rejected'
|