Spaces:
Sleeping
Sleeping
Update my_model/KBVQA.py
Browse files- my_model/KBVQA.py +3 -3
my_model/KBVQA.py
CHANGED
@@ -159,12 +159,12 @@ class KBVQA():
|
|
159 |
|
160 |
return output_text.capitalize()
|
161 |
|
162 |
-
def prepare_kbvqa_model(
|
163 |
free_gpu_resources()
|
164 |
kbvqa = KBVQA()
|
165 |
-
kbvqa.detection_model = detection_model
|
166 |
# Progress bar for model loading
|
167 |
-
with st.spinner('Loading model...'):
|
168 |
|
169 |
if not only_reload_detection_model:
|
170 |
progress_bar = st.progress(0)
|
|
|
159 |
|
160 |
return output_text.capitalize()
|
161 |
|
162 |
+
def prepare_kbvqa_model(only_reload_detection_model=False):
|
163 |
free_gpu_resources()
|
164 |
kbvqa = KBVQA()
|
165 |
+
kbvqa.detection_model = st.session_state.detection_model
|
166 |
# Progress bar for model loading
|
167 |
+
with st.spinner('Loading model... this should take no more than a few minutes.'):
|
168 |
|
169 |
if not only_reload_detection_model:
|
170 |
progress_bar = st.progress(0)
|