Spaces:
Sleeping
Sleeping
Update my_model/tabs/run_inference.py
Browse files
my_model/tabs/run_inference.py
CHANGED
|
@@ -242,9 +242,13 @@ class InferenceRunner(StateManager):
|
|
| 242 |
if self.is_model_loaded and self.settings_changed:
|
| 243 |
self.col1.warning("Model settings have changed, please reload the model, this will take a second .. ")
|
| 244 |
self.update_prev_state()
|
| 245 |
-
st.session_state.button_label =
|
| 246 |
-
|
| 247 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 248 |
|
| 249 |
with self.col1:
|
| 250 |
if st.session_state.method == "7b-Fine-Tuned Model" or st.session_state.method == "13b-Fine-Tuned Model":
|
|
|
|
| 242 |
if self.is_model_loaded and self.settings_changed:
|
| 243 |
self.col1.warning("Model settings have changed, please reload the model, this will take a second .. ")
|
| 244 |
self.update_prev_state()
|
| 245 |
+
st.session_state.button_label = (
|
| 246 |
+
"Reload Model" if (self.is_model_loaded and
|
| 247 |
+
st.session_state.kbvqa.detection_model != st.session_state['detection_model'] and
|
| 248 |
+
self.settings_changed())
|
| 249 |
+
else "Load Model"
|
| 250 |
+
)
|
| 251 |
+
|
| 252 |
|
| 253 |
with self.col1:
|
| 254 |
if st.session_state.method == "7b-Fine-Tuned Model" or st.session_state.method == "13b-Fine-Tuned Model":
|