m7mdal7aj commited on
Commit
78c10a6
1 Parent(s): 3b98e5e

Update my_model/tabs/run_inference.py

Browse files
Files changed (1) hide show
  1. my_model/tabs/run_inference.py +2 -1
my_model/tabs/run_inference.py CHANGED
@@ -250,7 +250,8 @@ class InferenceRunner(StateManager):
250
  st.session_state.button_label = (
251
  "Reload Model" if (self.is_model_loaded and
252
  st.session_state.kbvqa.detection_model != st.session_state['detection_model']) or
253
- st.session_state['method'] != st.session_state['previous_state']['method']
 
254
  else "Load Model"
255
  )
256
 
 
250
  st.session_state.button_label = (
251
  "Reload Model" if (self.is_model_loaded and
252
  st.session_state.kbvqa.detection_model != st.session_state['detection_model']) or
253
+ (st.session_state['previous_state']['method'] is not None and
254
+ st.session_state['method'] != st.session_state['previous_state']['method'])
255
  else "Load Model"
256
  )
257