Spaces:
Running
Running
Update my_model/tabs/run_inference.py
Browse files
my_model/tabs/run_inference.py
CHANGED
@@ -244,7 +244,6 @@ class InferenceRunner(StateManager):
|
|
244 |
reload_detection_model = False
|
245 |
force_reload_full_model = False
|
246 |
|
247 |
-
# self.update_prev_state()
|
248 |
st.session_state.button_label = (
|
249 |
"Reload Model" if (self.is_model_loaded and
|
250 |
st.session_state.kbvqa.detection_model != st.session_state['detection_model']) or
|
@@ -252,7 +251,7 @@ class InferenceRunner(StateManager):
|
|
252 |
st.session_state['method'] != st.session_state['previous_state']['method'])
|
253 |
else "Load Model"
|
254 |
)
|
255 |
-
|
256 |
if st.session_state.button_label == "Reload Model":
|
257 |
self.col1.warning("Model settings have changed, please reload the model.. ")
|
258 |
|
@@ -304,11 +303,6 @@ class InferenceRunner(StateManager):
|
|
304 |
f'Model using {st.session_state.method} is desgined but requires large scale data and multiple '
|
305 |
f'high-end GPUs, implementation will be explored in the future.')
|
306 |
|
307 |
-
st.write(st.session_state['method'])
|
308 |
-
st.write(st.session_state['previous_state']['method'])
|
309 |
-
if st.session_state['kbvqa'] is not None:
|
310 |
-
st.write(st.session_state['kbvqa'].kbvqa_model_name)
|
311 |
-
|
312 |
if self.is_model_loaded:
|
313 |
free_gpu_resources()
|
314 |
st.session_state['loading_in_progress'] = False
|
|
|
244 |
reload_detection_model = False
|
245 |
force_reload_full_model = False
|
246 |
|
|
|
247 |
st.session_state.button_label = (
|
248 |
"Reload Model" if (self.is_model_loaded and
|
249 |
st.session_state.kbvqa.detection_model != st.session_state['detection_model']) or
|
|
|
251 |
st.session_state['method'] != st.session_state['previous_state']['method'])
|
252 |
else "Load Model"
|
253 |
)
|
254 |
+
|
255 |
if st.session_state.button_label == "Reload Model":
|
256 |
self.col1.warning("Model settings have changed, please reload the model.. ")
|
257 |
|
|
|
303 |
f'Model using {st.session_state.method} is desgined but requires large scale data and multiple '
|
304 |
f'high-end GPUs, implementation will be explored in the future.')
|
305 |
|
|
|
|
|
|
|
|
|
|
|
306 |
if self.is_model_loaded:
|
307 |
free_gpu_resources()
|
308 |
st.session_state['loading_in_progress'] = False
|