nielsr HF staff commited on
Commit
d6b2a16
1 Parent(s): 76c8f3a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -27,7 +27,7 @@ def generate_caption(processor, model, image, tokenizer=None):
27
  generated_ids = model.generate(pixel_values=inputs.pixel_values, max_length=50)
28
 
29
  if tokenizer is not None:
30
- generated_ids = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
31
  else:
32
  generated_caption = processor.batch_decode(generated_ids, skip_special_tokens=True)[0]
33
 
 
27
  generated_ids = model.generate(pixel_values=inputs.pixel_values, max_length=50)
28
 
29
  if tokenizer is not None:
30
+ generated_caption = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
31
  else:
32
  generated_caption = processor.batch_decode(generated_ids, skip_special_tokens=True)[0]
33