rjiang12 commited on
Commit
d64c183
·
1 Parent(s): 5ae1949

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -61,7 +61,8 @@ def generate_answer_git(processor, model, image, question):
61
  inputs["top_k"] = 50
62
  inputs["top_p"] = 0.95
63
 
64
- out = model.generate(**inputs)
 
65
  print(model.config.id2label)
66
  print(processor.batch_decode(out, skip_special_tokens=True))
67
 
 
61
  inputs["top_k"] = 50
62
  inputs["top_p"] = 0.95
63
 
64
+ out = model.generate(**inputs, return_dict_in_generate=True, output_scores=True)
65
+ print(out.scores)
66
  print(model.config.id2label)
67
  print(processor.batch_decode(out, skip_special_tokens=True))
68