m7mdal7aj commited on
Commit
423afda
1 Parent(s): 4c2fb5b

Update my_model/KBVQA.py

Browse files
Files changed (1) hide show
  1. my_model/KBVQA.py +0 -3
my_model/KBVQA.py CHANGED
@@ -144,9 +144,6 @@ class KBVQA():
144
 
145
  def generate_answer(self, question, caption, detected_objects_str,):
146
 
147
- caption = self.get_caption(img)
148
- image_with_boxes, detected_objects_str = self.detect_objects(img)
149
- st.write(detected_objects_str)
150
  prompt = self.format_prompt(question, caption=caption, objects=detected_objects_str)
151
  num_tokens = len(self.kbvqa_tokenizer.tokenize(prompt))
152
  if num_tokens > self.max_context_window:
 
144
 
145
  def generate_answer(self, question, caption, detected_objects_str,):
146
 
 
 
 
147
  prompt = self.format_prompt(question, caption=caption, objects=detected_objects_str)
148
  num_tokens = len(self.kbvqa_tokenizer.tokenize(prompt))
149
  if num_tokens > self.max_context_window: