Spaces:
Sleeping
Sleeping
Update prediction.py
Browse files- prediction.py +9 -9
prediction.py
CHANGED
@@ -86,21 +86,21 @@ def run():
|
|
86 |
if submitted:
|
87 |
|
88 |
# Predict using loaded model
|
89 |
-
|
90 |
|
91 |
# Menampilkan data input
|
92 |
-
|
93 |
-
|
94 |
|
95 |
# Menampilkan hasil prediksi
|
96 |
-
|
97 |
-
|
98 |
|
99 |
# Menampilkan pesan berdasarkan hasil prediksi
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
|
105 |
if __name__ == '__main__':
|
106 |
run()
|
|
|
86 |
if submitted:
|
87 |
|
88 |
# Predict using loaded model
|
89 |
+
predictions = loaded_model.predict(data_inf)
|
90 |
|
91 |
# Menampilkan data input
|
92 |
+
st.write('## Data Input:')
|
93 |
+
st.dataframe(data_inf)
|
94 |
|
95 |
# Menampilkan hasil prediksi
|
96 |
+
st.write('## Hasil Prediksi:')
|
97 |
+
st.write('Deposit:', int(predictions[0]))
|
98 |
|
99 |
# Menampilkan pesan berdasarkan hasil prediksi
|
100 |
+
if predictions[0] == 0:
|
101 |
+
st.write("Nasabah belum berlangganan deposito berjangka.")
|
102 |
+
else:
|
103 |
+
st.write("Nasabah telah berlangganan deposito berjangka.")
|
104 |
|
105 |
if __name__ == '__main__':
|
106 |
run()
|