m7mdal7aj commited on
Commit
77f9d5b
1 Parent(s): b7c642c

Update my_model/tabs/run_inference.py

Browse files
Files changed (1) hide show
  1. my_model/tabs/run_inference.py +4 -1
my_model/tabs/run_inference.py CHANGED
@@ -78,7 +78,10 @@ def run_inference():
78
  st.title("Run Inference")
79
  state_manager.initialize_state()
80
  state_manager.set_up_widgets()
81
- st.session_state.button_label = "Reload Model" if state_manager.is_model_loaded() and state_manager.has_state_changed() else "Load Model"
 
 
 
82
  # state_manager.display_session_state()
83
  state_manager.display_model_settings()
84
  state_manager.display_session_state()
 
78
  st.title("Run Inference")
79
  state_manager.initialize_state()
80
  state_manager.set_up_widgets()
81
+ st.session_state['settings_changed'] = state_manager.has_state_changed()
82
+ if st.session_state['settings_changed']:
83
+ st.warning("Model settings have changed, please reload the model, this will take a second .. ")
84
+ st.session_state.button_label = "Reload Model" if state_manager.is_model_loaded() and st.session_state['settings_changed'] else "Load Model"
85
  # state_manager.display_session_state()
86
  state_manager.display_model_settings()
87
  state_manager.display_session_state()