deeploy-adubowski commited on
Commit
236a1fc
·
1 Parent(s): c352ea3

Fix session state for evaluations

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -113,7 +113,8 @@ with st.sidebar:
113
  client = Client(**client_options)
114
 
115
  # with tabs[0] as loan_application:
116
- selected = "Loan Application"
 
117
  # if selected == "Loan Application":
118
  # Attributes
119
  st.subheader("Loan Application")
@@ -201,10 +202,10 @@ if deployment_token != "my-secret-token":
201
  )
202
  if predict_button:
203
  st.session_state.predict_button_clicked = True
204
- selected = "Loan Decision"
205
 
206
 
207
- if selected == "Loan Decision":
208
  # If no prediction, show "loading..."
209
  try:
210
  with st.spinner("Loading..."):
 
113
  client = Client(**client_options)
114
 
115
  # with tabs[0] as loan_application:
116
+ if "selected" not in st.session_state:
117
+ st.session_state.selected = "Loan Application"
118
  # if selected == "Loan Application":
119
  # Attributes
120
  st.subheader("Loan Application")
 
202
  )
203
  if predict_button:
204
  st.session_state.predict_button_clicked = True
205
+ st.session_state.selected = "Loan Decision"
206
 
207
 
208
+ if st.session_state.selected == "Loan Decision":
209
  # If no prediction, show "loading..."
210
  try:
211
  with st.spinner("Loading..."):