Shafanda Nabil Sembodo commited on
Commit ·
06c371b
1
Parent(s): 7f5ad9a
trial
Browse files
app.py
CHANGED
|
@@ -32,13 +32,15 @@ def prediction():
|
|
| 32 |
df = pd.read_csv(uploaded_file)
|
| 33 |
model = load_model()
|
| 34 |
prediction = predict_model(model, df).drop(columns='Unnamed: 0')
|
|
|
|
|
|
|
|
|
|
| 35 |
|
| 36 |
-
|
| 37 |
-
|
| 38 |
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
|
| 44 |
-
prediction()
|
|
|
|
| 32 |
df = pd.read_csv(uploaded_file)
|
| 33 |
model = load_model()
|
| 34 |
prediction = predict_model(model, df).drop(columns='Unnamed: 0')
|
| 35 |
+
return prediction
|
| 36 |
+
|
| 37 |
+
result = prediction()
|
| 38 |
|
| 39 |
+
# show the result
|
| 40 |
+
st.write(result)
|
| 41 |
|
| 42 |
+
# download the result
|
| 43 |
+
csv = convert_df(result)
|
| 44 |
+
if st.download_button('Download Prediction', csv, 'prediction.csv'):
|
| 45 |
+
st.write('Thanks for downloading!')
|
| 46 |
|
|
|