Spaces:
Sleeping
Sleeping
Update my_model/KBVQA.py
Browse files- 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:
|