Spaces:
Running
Running
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 |
-
|
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}")
|