m7mdal7aj commited on
Commit
61382de
1 Parent(s): 1a38c08

Update my_model/tabs/run_inference.py

Browse files
Files changed (1) hide show
  1. my_model/tabs/run_inference.py +7 -3
my_model/tabs/run_inference.py CHANGED
@@ -242,9 +242,13 @@ class InferenceRunner(StateManager):
242
  if self.is_model_loaded and self.settings_changed:
243
  self.col1.warning("Model settings have changed, please reload the model, this will take a second .. ")
244
  self.update_prev_state()
245
- st.session_state.button_label = "Reload Model" if (self.is_model_loaded
246
- and st.session_state.kbvqa.detection_model != st.session_state['detection_model'])
247
- and self.dettings_changed() else "Load Model"
 
 
 
 
248
 
249
  with self.col1:
250
  if st.session_state.method == "7b-Fine-Tuned Model" or st.session_state.method == "13b-Fine-Tuned Model":
 
242
  if self.is_model_loaded and self.settings_changed:
243
  self.col1.warning("Model settings have changed, please reload the model, this will take a second .. ")
244
  self.update_prev_state()
245
+ st.session_state.button_label = (
246
+ "Reload Model" if (self.is_model_loaded and
247
+ st.session_state.kbvqa.detection_model != st.session_state['detection_model'] and
248
+ self.settings_changed())
249
+ else "Load Model"
250
+ )
251
+
252
 
253
  with self.col1:
254
  if st.session_state.method == "7b-Fine-Tuned Model" or st.session_state.method == "13b-Fine-Tuned Model":