m7mdal7aj commited on
Commit
567d6d1
1 Parent(s): ec4889b

Update my_model/KBVQA.py

Browse files
Files changed (1) hide show
  1. 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(model_type='i_blip')
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.load_fine_tuned_model()
149
  progress_bar.progress(33)
150
  kbvqa.load_caption_model()
151
  progress_bar.progress(66)
152
- kbvqa.load_detector(detection_model) # Replace with your model
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: