m7mdal7aj commited on
Commit
45ef170
1 Parent(s): d0e9fe6

Update my_model/tabs/run_inference.py

Browse files
Files changed (1) hide show
  1. my_model/tabs/run_inference.py +5 -4
my_model/tabs/run_inference.py CHANGED
@@ -115,14 +115,15 @@ def run_inference():
115
 
116
  button_label = "Reload Model" if st.session_state['kbvqa'] else "Load Model"
117
 
118
- if method == "Fine-Tuned Model":
119
  if st.button(button_label):
120
- if button_label == "Load Model":
121
  # st write(st.session_state['kbvqa'])
 
122
  st.write("Model already loaded.")
123
  else:
124
- st.text("Loading the model, please wait...")
125
- state_manager.load_model(detection_model, confidence_level)
126
  st.write("Model is ready for inference.")
127
 
128
  if state_manager.is_model_loaded():
 
115
 
116
  button_label = "Reload Model" if st.session_state['kbvqa'] else "Load Model"
117
 
118
+ if st.session_state.method == "Fine-Tuned Model":
119
  if st.button(button_label):
120
+ if button_label == "Load Model" and state_manager.is_model_loaded():
121
  # st write(st.session_state['kbvqa'])
122
+ st.write("stop playing around :):)P:)")
123
  st.write("Model already loaded.")
124
  else:
125
+
126
+ state_manager.load_model()
127
  st.write("Model is ready for inference.")
128
 
129
  if state_manager.is_model_loaded():