m7mdal7aj commited on
Commit
f3a7724
1 Parent(s): 08655fb

Update my_model/utilities/state_manager.py

Browse files
my_model/utilities/state_manager.py CHANGED
@@ -26,11 +26,11 @@ class StateManager:
26
  detection_model = st.selectbox("Choose a model for objects detection:", ["yolov5", "detic"], index=1, key='detection_model')
27
  default_confidence = 0.2 if st.session_state.detection_model == "yolov5" else 0.4
28
  self.set_slider_value(text="Select minimum detection confidence level", min_value=0.1, max_value=0.9, value=default_confidence, step=0.1, slider_key_name='confidence_level')
29
- show_session_state = st.sidebar.checkbox("Show Session State", False)
30
 
31
  # Conditional display of model settings
32
- if show_session_state:
33
- display_model_settings()
34
 
35
 
36
  def set_slider_value(self, text, min_value, max_value, value, step, slider_key_name):
 
26
  detection_model = st.selectbox("Choose a model for objects detection:", ["yolov5", "detic"], index=1, key='detection_model')
27
  default_confidence = 0.2 if st.session_state.detection_model == "yolov5" else 0.4
28
  self.set_slider_value(text="Select minimum detection confidence level", min_value=0.1, max_value=0.9, value=default_confidence, step=0.1, slider_key_name='confidence_level')
29
+ show_model_settings = st.sidebar.checkbox("Show Model Settings", False)
30
 
31
  # Conditional display of model settings
32
+ if show_model_settings:
33
+ seld.display_model_settings()
34
 
35
 
36
  def set_slider_value(self, text, min_value, max_value, value, step, slider_key_name):