Spaces:
Sleeping
Sleeping
Update my_model/tabs/run_inference.py
Browse files
my_model/tabs/run_inference.py
CHANGED
|
@@ -30,7 +30,7 @@ class InferenceRunner(StateManager):
|
|
| 30 |
"""
|
| 31 |
|
| 32 |
super().__init__()
|
| 33 |
-
|
| 34 |
|
| 35 |
|
| 36 |
def answer_question(self, caption, detected_objects_str, question, model):
|
|
@@ -147,7 +147,7 @@ class InferenceRunner(StateManager):
|
|
| 147 |
if st.session_state['settings_changed']:
|
| 148 |
self.col1.warning("Model settings have changed, please reload the model, this will take a second .. ")
|
| 149 |
|
| 150 |
-
st.session_state.button_label = "Reload Model" if self.is_model_loaded
|
| 151 |
|
| 152 |
with self.col1:
|
| 153 |
if st.session_state.method == "Fine-Tuned Model":
|
|
|
|
| 30 |
"""
|
| 31 |
|
| 32 |
super().__init__()
|
| 33 |
+
# self.initialize_state()
|
| 34 |
|
| 35 |
|
| 36 |
def answer_question(self, caption, detected_objects_str, question, model):
|
|
|
|
| 147 |
if st.session_state['settings_changed']:
|
| 148 |
self.col1.warning("Model settings have changed, please reload the model, this will take a second .. ")
|
| 149 |
|
| 150 |
+
st.session_state.button_label = "Reload Model" if self.is_model_loaded and self.settings_changed else "Load Model"
|
| 151 |
|
| 152 |
with self.col1:
|
| 153 |
if st.session_state.method == "Fine-Tuned Model":
|