m7mdal7aj commited on
Commit
3d9562e
1 Parent(s): 9a8f19a

Update my_model/tabs/run_inference.py

Browse files
Files changed (1) hide show
  1. my_model/tabs/run_inference.py +3 -7
my_model/tabs/run_inference.py CHANGED
@@ -81,8 +81,7 @@ def run_inference():
81
  st.session_state['settings_changed'] = state_manager.has_state_changed()
82
  if st.session_state['settings_changed']:
83
  st.warning("Model settings have changed, please reload the model, this will take a second .. ")
84
- st.write(f' model loaded ? {state_manager.is_model_loaded()}')
85
- st.write(f" settings_changed ? {st.session_state['settings_changed']}")
86
  st.session_state.button_label = "Reload Model" if state_manager.is_model_loaded() and state_manager.settings_changed else "Load Model"
87
  # state_manager.display_session_state()
88
  state_manager.display_model_settings()
@@ -99,16 +98,13 @@ def run_inference():
99
 
100
  else:
101
  state_manager.reload_detection_model()
102
- st.success("Model reloaded with updated settings and ready for inference.")
103
 
104
  if state_manager.is_model_loaded() and st.session_state.kbvqa.all_models_loaded:
105
  image_qa_app(state_manager.get_model())
106
 
107
-
108
- st.write(st.session_state.kbvqa.all_models_loaded)
109
-
110
  else:
111
- st.write('Model is not ready yet, will be updated later.')
112
 
113
 
114
 
 
81
  st.session_state['settings_changed'] = state_manager.has_state_changed()
82
  if st.session_state['settings_changed']:
83
  st.warning("Model settings have changed, please reload the model, this will take a second .. ")
84
+
 
85
  st.session_state.button_label = "Reload Model" if state_manager.is_model_loaded() and state_manager.settings_changed else "Load Model"
86
  # state_manager.display_session_state()
87
  state_manager.display_model_settings()
 
98
 
99
  else:
100
  state_manager.reload_detection_model()
101
+
102
 
103
  if state_manager.is_model_loaded() and st.session_state.kbvqa.all_models_loaded:
104
  image_qa_app(state_manager.get_model())
105
 
 
 
 
106
  else:
107
+ st.write(f'Model using {st.session_state.method} is not deplyed yet, will be ready later.')
108
 
109
 
110