rjiang12 commited on
Commit
b111cce
·
1 Parent(s): 1d036b5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -60,9 +60,9 @@ def generate_answer_blip(processor, model, image, question):
60
  generated_ids = model.generate(**inputs, max_length=50, output_scores=True)
61
  print(generated_ids)
62
  generated_answer = processor.batch_decode(generated_ids, skip_special_tokens=True)
63
- generated_answer0 = processor.batch_decode(generated_ids.sequences, skip_special_tokens=True)[0]
64
  print(generated_answer0)
65
- generated_answer1 = processor.batch_decode(generated_ids.sequences, skip_special_tokens=True)[1]
66
  print(generated_answer1)
67
 
68
  return generated_answer
 
60
  generated_ids = model.generate(**inputs, max_length=50, output_scores=True)
61
  print(generated_ids)
62
  generated_answer = processor.batch_decode(generated_ids, skip_special_tokens=True)
63
+ generated_answer0 = processor.batch_decode(generated_ids, skip_special_tokens=True)[0]
64
  print(generated_answer0)
65
+ generated_answer1 = processor.batch_decode(generated_ids, skip_special_tokens=True)[1]
66
  print(generated_answer1)
67
 
68
  return generated_answer