Shafanda Nabil Sembodo
commited on
Commit
·
9aed1ed
1
Parent(s):
5a55bb1
update
Browse files
app.py
CHANGED
|
@@ -28,14 +28,15 @@ def run():
|
|
| 28 |
if uploaded_file is not None:
|
| 29 |
# do prediction
|
| 30 |
data = pd.read_csv(uploaded_file)
|
| 31 |
-
prediction =
|
|
|
|
| 32 |
|
| 33 |
# show the result
|
| 34 |
-
st.write(prediction)
|
| 35 |
|
| 36 |
# download the result
|
| 37 |
-
csv = convert_df(prediction)
|
| 38 |
-
if st.download_button('Download Prediction', csv, 'prediction.csv'):
|
| 39 |
-
|
| 40 |
|
| 41 |
run()
|
|
|
|
| 28 |
if uploaded_file is not None:
|
| 29 |
# do prediction
|
| 30 |
data = pd.read_csv(uploaded_file)
|
| 31 |
+
prediction = model[-1].predict(data.iloc[:, :-1])
|
| 32 |
+
print(prediction)
|
| 33 |
|
| 34 |
# show the result
|
| 35 |
+
# st.write(prediction)
|
| 36 |
|
| 37 |
# download the result
|
| 38 |
+
# csv = convert_df(prediction)
|
| 39 |
+
# if st.download_button('Download Prediction', csv, 'prediction.csv'):
|
| 40 |
+
# st.write('Thanks for downloading!')
|
| 41 |
|
| 42 |
run()
|