joaopimenta commited on
Commit
2d68b6e
Β·
verified Β·
1 Parent(s): 8b1c5e9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -7
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('/Users/joaopimenta/Downloads/ensemble_test.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 = "/Users/joaopimenta/Downloads/final_xgboost_model.pkl"
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 = "/Users/joaopimenta/Downloads/Capstone/best_mlp_model_full.pth"
513
- pca_path = "/Users/joaopimenta/Downloads/Capstone/best_pca_model.pkl"
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 = '/Users/joaopimenta/Downloads/best_lgbm_model.pkl'
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("/Users/joaopimenta/Downloads/best_ensemble_model.pkl")
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