Update app.py
Browse files
app.py
CHANGED
@@ -96,7 +96,7 @@ elif page== "π Tabular Data":
|
|
96 |
st_lottie(lottie_hello, speed=1, loop=True, height=200)
|
97 |
|
98 |
# Load dataset
|
99 |
-
df = pd.read_csv('/
|
100 |
|
101 |
# Streamlit App Header
|
102 |
st.title('π₯ Hospital Readmission Prediction')
|
@@ -224,8 +224,8 @@ elif page== "π Tabular Data":
|
|
224 |
# Display Processed Data
|
225 |
st.markdown("---")
|
226 |
|
227 |
-
# Load XGBoost model
|
228 |
-
tabular_model_path = "/
|
229 |
tabular_model = joblib.load(tabular_model_path)
|
230 |
print("β
XGBoost Tabular Model loaded successfully!")
|
231 |
|
@@ -509,8 +509,8 @@ elif page == "π Clinical Text Notes":
|
|
509 |
return self.net(x)
|
510 |
|
511 |
# --- Load MLP Model and PCA ---
|
512 |
-
mlp_model_path = "/
|
513 |
-
pca_path = "/
|
514 |
|
515 |
best_mlp_model = torch.load(mlp_model_path)
|
516 |
best_mlp_model.to(device)
|
@@ -701,7 +701,7 @@ elif page == "π Clinical Text Notes":
|
|
701 |
#st.write(df)
|
702 |
|
703 |
#load lighGBoost model
|
704 |
-
light_path = '/
|
705 |
light_model = joblib.load(light_path)
|
706 |
#st.write("LightGBoost Model loaded sucessfully!")
|
707 |
|
@@ -764,7 +764,7 @@ elif page == "π Clinical Text Notes":
|
|
764 |
elif page == "π Ensemble Prediction":
|
765 |
|
766 |
# Load the ensemble model
|
767 |
-
ensemble_model = joblib.load("/
|
768 |
#st.write("β
Ensemble Model loaded successfully!")
|
769 |
|
770 |
# Define models
|
|
|
96 |
st_lottie(lottie_hello, speed=1, loop=True, height=200)
|
97 |
|
98 |
# Load dataset
|
99 |
+
df = pd.read_csv('/home/user/app/ensemble_test.csv')
|
100 |
|
101 |
# Streamlit App Header
|
102 |
st.title('π₯ Hospital Readmission Prediction')
|
|
|
224 |
# Display Processed Data
|
225 |
st.markdown("---")
|
226 |
|
227 |
+
# Load XGBoost model
|
228 |
+
tabular_model_path = "/home/user/app/final_xgboost_model.pkl"
|
229 |
tabular_model = joblib.load(tabular_model_path)
|
230 |
print("β
XGBoost Tabular Model loaded successfully!")
|
231 |
|
|
|
509 |
return self.net(x)
|
510 |
|
511 |
# --- Load MLP Model and PCA ---
|
512 |
+
mlp_model_path = "/home/user/app/best_mlp_model_full.pth"
|
513 |
+
pca_path = "/home/user/app/best_pca_model.pkl"
|
514 |
|
515 |
best_mlp_model = torch.load(mlp_model_path)
|
516 |
best_mlp_model.to(device)
|
|
|
701 |
#st.write(df)
|
702 |
|
703 |
#load lighGBoost model
|
704 |
+
light_path = '/home/user/app/best_lgbm_model.pkl'
|
705 |
light_model = joblib.load(light_path)
|
706 |
#st.write("LightGBoost Model loaded sucessfully!")
|
707 |
|
|
|
764 |
elif page == "π Ensemble Prediction":
|
765 |
|
766 |
# Load the ensemble model
|
767 |
+
ensemble_model = joblib.load("/home/user/app/best_ensemble_model.pkl")
|
768 |
#st.write("β
Ensemble Model loaded successfully!")
|
769 |
|
770 |
# Define models
|