Spaces:
Sleeping
Sleeping
Commit
•
40a3917
1
Parent(s):
a09a604
Update app.py
Browse files
app.py
CHANGED
@@ -276,8 +276,8 @@ def main():
|
|
276 |
if st.sidebar.checkbox("Neural Network"):
|
277 |
st.subheader(":orange[Neural Network] :sunglasses:")
|
278 |
ann = load_model("ann.h5")
|
279 |
-
|
280 |
-
|
281 |
st.subheader(':green[Prediction]')
|
282 |
loan_status = np.array(['N','Y'])
|
283 |
prediction = pd.DataFrame(loan_status[pred], columns=['prediction'])
|
@@ -422,12 +422,12 @@ def main():
|
|
422 |
if st.sidebar.checkbox("Neural Network"):
|
423 |
st.subheader(":orange[Neural Network]")
|
424 |
ann = load_model('ann.h5')
|
425 |
-
|
426 |
if pred == 1:
|
427 |
st.write(":orange[__Le pret peut etre octroyer__] :white_check_mark:")
|
428 |
else:
|
429 |
st.write(":red[__Desole,...__] :disappointed:")
|
430 |
-
|
431 |
loan_status = np.array(['N','Y'])
|
432 |
prediction = pd.DataFrame(loan_status[pred], columns=['prediction'])
|
433 |
df = pd.concat([data_input, prediction], axis=1)
|
|
|
276 |
if st.sidebar.checkbox("Neural Network"):
|
277 |
st.subheader(":orange[Neural Network] :sunglasses:")
|
278 |
ann = load_model("ann.h5")
|
279 |
+
pred_proba = ann.predict(X)
|
280 |
+
pred = np.where(pred_proba < 0.5, 0, 1)
|
281 |
st.subheader(':green[Prediction]')
|
282 |
loan_status = np.array(['N','Y'])
|
283 |
prediction = pd.DataFrame(loan_status[pred], columns=['prediction'])
|
|
|
422 |
if st.sidebar.checkbox("Neural Network"):
|
423 |
st.subheader(":orange[Neural Network]")
|
424 |
ann = load_model('ann.h5')
|
425 |
+
pred_proba = ann.predict(data_input)
|
426 |
if pred == 1:
|
427 |
st.write(":orange[__Le pret peut etre octroyer__] :white_check_mark:")
|
428 |
else:
|
429 |
st.write(":red[__Desole,...__] :disappointed:")
|
430 |
+
pred = np.where(pred_proba < 0.5, 0, 1)
|
431 |
loan_status = np.array(['N','Y'])
|
432 |
prediction = pd.DataFrame(loan_status[pred], columns=['prediction'])
|
433 |
df = pd.concat([data_input, prediction], axis=1)
|