Update my_model/KBVQA.py
Browse files- my_model/KBVQA.py +3 -3
my_model/KBVQA.py
CHANGED
|
@@ -48,7 +48,7 @@ class KBVQA():
|
|
| 48 |
|
| 49 |
|
| 50 |
def load_caption_model(self):
|
| 51 |
-
self.captioner = ImageCaptioningModel(
|
| 52 |
self.captioner.load_model()
|
| 53 |
|
| 54 |
def get_caption(self, img):
|
|
@@ -145,11 +145,11 @@ def prepare_kbvqa_model(detection_model):
|
|
| 145 |
# Progress bar for model loading
|
| 146 |
with st.spinner('Loading models...'):
|
| 147 |
progress_bar = st.progress(0)
|
| 148 |
-
kbvqa.
|
| 149 |
progress_bar.progress(33)
|
| 150 |
kbvqa.load_caption_model()
|
| 151 |
progress_bar.progress(66)
|
| 152 |
-
kbvqa.
|
| 153 |
progress_bar.progress(100)
|
| 154 |
|
| 155 |
if kbvqa.all_models_loaded:
|
|
|
|
| 48 |
|
| 49 |
|
| 50 |
def load_caption_model(self):
|
| 51 |
+
self.captioner = ImageCaptioningModel()
|
| 52 |
self.captioner.load_model()
|
| 53 |
|
| 54 |
def get_caption(self, img):
|
|
|
|
| 145 |
# Progress bar for model loading
|
| 146 |
with st.spinner('Loading models...'):
|
| 147 |
progress_bar = st.progress(0)
|
| 148 |
+
kbvqa.load_detector(detection_model)
|
| 149 |
progress_bar.progress(33)
|
| 150 |
kbvqa.load_caption_model()
|
| 151 |
progress_bar.progress(66)
|
| 152 |
+
kbvqa.load_fine_tuned_model()
|
| 153 |
progress_bar.progress(100)
|
| 154 |
|
| 155 |
if kbvqa.all_models_loaded:
|