SahilJ2 commited on
Commit
50ead07
1 Parent(s): 4a9aa83

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -96,7 +96,7 @@ def m2(que, image):
96
  input_ids = torch.tensor(input_ids).unsqueeze(0)
97
 
98
  generated_ids = model3.generate(pixel_values=pixel_values, input_ids=input_ids, max_length=50)
99
- return processor3.batch_decode(generated_ids, skip_special_tokens=True)
100
 
101
  def m3(que, image):
102
  # processor3 = DonutProcessor.from_pretrained("naver-clova-ix/donut-base-finetuned-docvqa")
 
96
  input_ids = torch.tensor(input_ids).unsqueeze(0)
97
 
98
  generated_ids = model3.generate(pixel_values=pixel_values, input_ids=input_ids, max_length=50)
99
+ return processor3.batch_decode(generated_ids, skip_special_tokens=True)[0]
100
 
101
  def m3(que, image):
102
  # processor3 = DonutProcessor.from_pretrained("naver-clova-ix/donut-base-finetuned-docvqa")