Update my_model/tabs/run_inference.py
Browse files
my_model/tabs/run_inference.py
CHANGED
@@ -94,10 +94,6 @@ class InferenceRunner(StateManager):
|
|
94 |
st.session_state.button_label = "Reload Model" if self.is_model_loaded() and self.settings_changed else "Load Model"
|
95 |
|
96 |
with self.col1:
|
97 |
-
|
98 |
-
if self.is_model_loaded():
|
99 |
-
free_gpu_resources()
|
100 |
-
self.image_qa_app(self.get_model())
|
101 |
|
102 |
if st.session_state.method == "Fine-Tuned Model":
|
103 |
|
@@ -129,11 +125,17 @@ class InferenceRunner(StateManager):
|
|
129 |
elif reload_detection_model:
|
130 |
free_gpu_resources()
|
131 |
self.reload_detection_model()
|
|
|
132 |
elif force_reload_full_model:
|
133 |
free_gpu_resources()
|
134 |
self.force_reload_model()
|
135 |
-
|
136 |
-
|
137 |
|
138 |
elif st.session_state.method == "In-Context Learning (n-shots)":
|
139 |
-
self.col1.warning(f'Model using {st.session_state.method} is not deployed yet, will be ready later.')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
94 |
st.session_state.button_label = "Reload Model" if self.is_model_loaded() and self.settings_changed else "Load Model"
|
95 |
|
96 |
with self.col1:
|
|
|
|
|
|
|
|
|
97 |
|
98 |
if st.session_state.method == "Fine-Tuned Model":
|
99 |
|
|
|
125 |
elif reload_detection_model:
|
126 |
free_gpu_resources()
|
127 |
self.reload_detection_model()
|
128 |
+
|
129 |
elif force_reload_full_model:
|
130 |
free_gpu_resources()
|
131 |
self.force_reload_model()
|
|
|
|
|
132 |
|
133 |
elif st.session_state.method == "In-Context Learning (n-shots)":
|
134 |
+
self.col1.warning(f'Model using {st.session_state.method} is not deployed yet, will be ready later.')
|
135 |
+
|
136 |
+
|
137 |
+
if self.is_model_loaded():
|
138 |
+
free_gpu_resources()
|
139 |
+
self.image_qa_app(self.get_model())
|
140 |
+
|
141 |
+
|