Update my_model/state_manager.py
Browse files
my_model/state_manager.py
CHANGED
@@ -240,7 +240,10 @@ class StateManager:
|
|
240 |
Returns:
|
241 |
bool: True if the model is loaded, False otherwise.
|
242 |
"""
|
243 |
-
return 'kbvqa' in st.session_state and st.session_state['kbvqa'] is not None and
|
|
|
|
|
|
|
244 |
|
245 |
|
246 |
def reload_detection_model(self) -> None:
|
|
|
240 |
Returns:
|
241 |
bool: True if the model is loaded, False otherwise.
|
242 |
"""
|
243 |
+
return 'kbvqa' in st.session_state and st.session_state['kbvqa'] is not None and \
|
244 |
+
st.session_state.kbvqa.all_models_loaded \
|
245 |
+
and (st.session_state['previous_state']['method'] is not None
|
246 |
+
and st.session_state['method'] == st.session_state['previous_state']['method'])
|
247 |
|
248 |
|
249 |
def reload_detection_model(self) -> None:
|