m7mdal7aj commited on
Commit
71b6b11
1 Parent(s): 2435ece

Update my_model/tabs/run_inference.py

Browse files
Files changed (1) hide show
  1. my_model/tabs/run_inference.py +5 -1
my_model/tabs/run_inference.py CHANGED
@@ -250,7 +250,7 @@ class InferenceRunner(StateManager):
250
  st.session_state.button_label = (
251
  "Reload Model" if (self.is_model_loaded and
252
  st.session_state.kbvqa.detection_model != st.session_state['detection_model']) or
253
- st.session_state.method != st.session_state.previous_state.method
254
  else "Load Model"
255
  )
256
 
@@ -292,6 +292,10 @@ class InferenceRunner(StateManager):
292
  st.session_state['time_taken_to_load_model'] = int(time.time() - t1)
293
  st.session_state['loading_in_progress'] = False
294
  st.session_state['model_loaded'] = True
 
 
 
 
295
  elif st.session_state.method == "Vision-Language Embeddings Alignment":
296
  self.col1.warning(
297
  f'Model using {st.session_state.method} is desgined but requires large scale data and multiple '
 
250
  st.session_state.button_label = (
251
  "Reload Model" if (self.is_model_loaded and
252
  st.session_state.kbvqa.detection_model != st.session_state['detection_model']) or
253
+ st.session_state[['method'] != st.session_state['previous_state']['method']
254
  else "Load Model"
255
  )
256
 
 
292
  st.session_state['time_taken_to_load_model'] = int(time.time() - t1)
293
  st.session_state['loading_in_progress'] = False
294
  st.session_state['model_loaded'] = True
295
+
296
+ st.write(st.session_state['method'])
297
+ st.write(st.session_state['previous_state']['method'])
298
+
299
  elif st.session_state.method == "Vision-Language Embeddings Alignment":
300
  self.col1.warning(
301
  f'Model using {st.session_state.method} is desgined but requires large scale data and multiple '