Browse Source

fix finetune-task

master
翎航 2 years ago
parent
commit
85f4d6b326
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      modelscope/preprocessors/ofa/visual_question_answering.py

+ 1
- 1
modelscope/preprocessors/ofa/visual_question_answering.py View File

@@ -83,7 +83,7 @@ class OfaVisualQuestionAnsweringPreprocessor(OfaBasePreprocessor):
def _build_infer_sample(self, data: Dict[str, Any]) -> Dict[str, Any]:
image = self.get_img_pil(data[self.column_map['image']])
patch_image = self.patch_resize_transform(image)
text = ' {}'.format(data[self.column_map['query']])
text = ' {}'.format(data[self.column_map['text']])
inputs = self.tokenize_text(text)
if self.prompt_type == 'none':
decoder_prompt = self.bos_item


Loading…
Cancel
Save