Update my_model/state_manager.py
Browse files
my_model/state_manager.py
CHANGED
@@ -220,7 +220,7 @@ class StateManager:
|
|
220 |
try:
|
221 |
free_gpu_resources()
|
222 |
if self.is_model_loaded:
|
223 |
-
|
224 |
st.write(st.session_state['detection_model'] == st.session_state['previous_state']['detection_model'])
|
225 |
st.write(st.session_state['method'] == st.session_state['previous_state']['method'])
|
226 |
st.write(st.session_state['confidence_level'] != st.session_state['previous_state']['confidence_level'])
|
@@ -229,9 +229,9 @@ class StateManager:
|
|
229 |
if st.session_state['detection_model'] == st.session_state['previous_state']['detection_model']\
|
230 |
and st.session_state['method'] == st.session_state['previous_state']['method'] \
|
231 |
and st.session_state['confidence_level'] != st.session_state['previous_state']['confidence_level']:
|
232 |
-
|
233 |
st.session_state['kbvqa'].detection_confidence = st.session_state.confidence_level
|
234 |
-
st.
|
235 |
return # only update the confidence level
|
236 |
|
237 |
prepare_kbvqa_model(only_reload_detection_model=True)
|
|
|
220 |
try:
|
221 |
free_gpu_resources()
|
222 |
if self.is_model_loaded:
|
223 |
+
|
224 |
st.write(st.session_state['detection_model'] == st.session_state['previous_state']['detection_model'])
|
225 |
st.write(st.session_state['method'] == st.session_state['previous_state']['method'])
|
226 |
st.write(st.session_state['confidence_level'] != st.session_state['previous_state']['confidence_level'])
|
|
|
229 |
if st.session_state['detection_model'] == st.session_state['previous_state']['detection_model']\
|
230 |
and st.session_state['method'] == st.session_state['previous_state']['method'] \
|
231 |
and st.session_state['confidence_level'] != st.session_state['previous_state']['confidence_level']:
|
232 |
+
|
233 |
st.session_state['kbvqa'].detection_confidence = st.session_state.confidence_level
|
234 |
+
st.write("reload func", st.session_state['kbvqa'].detection_confidence )
|
235 |
return # only update the confidence level
|
236 |
|
237 |
prepare_kbvqa_model(only_reload_detection_model=True)
|