AnonymousSub commited on
Commit
df847c3
1 Parent(s): 29ffaa1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -59,7 +59,7 @@ def generate_answer_vilt(processor, model, image, question):
59
  encoding = processor(images=image, text=question, return_tensors="pt")
60
 
61
  with torch.no_grad():
62
- outputs = model(**encoding)
63
 
64
  predicted_class_idx = outputs.logits.argmax(-1).item()
65
 
 
59
  encoding = processor(images=image, text=question, return_tensors="pt")
60
 
61
  with torch.no_grad():
62
+ outputs = model(**encoding, max_length=256)
63
 
64
  predicted_class_idx = outputs.logits.argmax(-1).item()
65