Update my_model/tabs/run_inference.py
Browse files
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 |
-
|
125 |
-
state_manager.load_model(
|
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():
|