m7mdal7aj commited on
Commit
9a8f19a
1 Parent(s): 87da9a2

Update my_model/utilities/state_manager.py

Browse files
my_model/utilities/state_manager.py CHANGED
@@ -84,8 +84,8 @@ class StateManager:
84
  free_gpu_resources()
85
  if self.is_model_loaded():
86
  prepare_kbvqa_model(only_reload_detection_model=True)
87
- st.session_state['kbvqa'].detection_confidence = confidence_level
88
- #self.update_model_settings(detection_model, confidence_level)
89
  free_gpu_resources()
90
  except Exception as e:
91
  st.error(f"Error reloading detection model: {e}")
 
84
  free_gpu_resources()
85
  if self.is_model_loaded():
86
  prepare_kbvqa_model(only_reload_detection_model=True)
87
+ st.session_state['kbvqa'].detection_confidence = st.session_state.confidence_level
88
+ st.success("Model reloaded with updated settings and ready for inference.")
89
  free_gpu_resources()
90
  except Exception as e:
91
  st.error(f"Error reloading detection model: {e}")