mridzuan commited on
Commit
6df7f66
·
1 Parent(s): f121e56

allow dynamic tgt selection

Browse files
Files changed (1) hide show
  1. src/pages/2_Bulk_Predictions.py +13 -11
src/pages/2_Bulk_Predictions.py CHANGED
@@ -25,6 +25,18 @@ if uploaded_file:
25
  if "bulk_input_df" in st.session_state:
26
  st.session_state.bulk_input_df = st.data_editor(st.session_state.bulk_input_df, num_rows="dynamic")
27
 
 
 
 
 
 
 
 
 
 
 
 
 
28
  if st.button("Predict"):
29
  if "bulk_input_df" not in st.session_state:
30
  st.warning("Please preprocess data first.")
@@ -49,17 +61,7 @@ if uploaded_file:
49
 
50
  df = st.session_state.bulk_input_df
51
 
52
- # TODO: Define the target column (customize this based on your use case)
53
- # target_col = st.session_state.target_col # "GVHD" # or "Acute GVHD(<100 days)", etc.
54
- target_col = st.selectbox(
55
- "Select target column to predict:",
56
- options=[
57
- "GVHD",
58
- "Acute GVHD(<100 days)",
59
- "Chronic GVHD>100 days",
60
- ],
61
- index=0
62
- )
63
 
64
  # Optional filtering depending on target choice
65
  if target_col in ["Acute GVHD(<100 days)", "Chronic GVHD>100 days"]:
 
25
  if "bulk_input_df" in st.session_state:
26
  st.session_state.bulk_input_df = st.data_editor(st.session_state.bulk_input_df, num_rows="dynamic")
27
 
28
+ # TODO: Define the target column (customize this based on your use case)
29
+ # target_col = st.session_state.target_col # "GVHD" # or "Acute GVHD(<100 days)", etc.
30
+ st.session_state.target_col = st.selectbox(
31
+ "Select target column to predict:",
32
+ options=[
33
+ "GVHD",
34
+ "Acute GVHD(<100 days)",
35
+ "Chronic GVHD>100 days",
36
+ ],
37
+ index=0
38
+ )
39
+
40
  if st.button("Predict"):
41
  if "bulk_input_df" not in st.session_state:
42
  st.warning("Please preprocess data first.")
 
61
 
62
  df = st.session_state.bulk_input_df
63
 
64
+ target_col = st.session_state.target_col
 
 
 
 
 
 
 
 
 
 
65
 
66
  # Optional filtering depending on target choice
67
  if target_col in ["Acute GVHD(<100 days)", "Chronic GVHD>100 days"]: