andgrt commited on
Commit
9c7b30e
·
1 Parent(s): 550f28a

fix: generate_answer_git

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -51,7 +51,7 @@ def generate_answer_git(image, question):
51
  "document-question-answering",
52
  model="andgrt/layoutlmv2-base-uncased_finetuned_docvqa",
53
  )
54
- return qa_pipeline(preprocess_image(image), question)[0]["answer"]
55
  # pixel_values, _, _ = preprocess_image(image)
56
  # input_ids = processor(text=question, add_special_tokens=False).input_ids
57
  # input_ids = [processor.tokenizer.cls_token_id] + input_ids
 
51
  "document-question-answering",
52
  model="andgrt/layoutlmv2-base-uncased_finetuned_docvqa",
53
  )
54
+ return qa_pipeline(image, question)[0]["answer"]
55
  # pixel_values, _, _ = preprocess_image(image)
56
  # input_ids = processor(text=question, add_special_tokens=False).input_ids
57
  # input_ids = [processor.tokenizer.cls_token_id] + input_ids