vmarellano commited on
Commit
8df61fb
·
verified ·
1 Parent(s): 605acfb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -15,7 +15,9 @@ text = "a photography of"
15
  inputs = processor(raw_image, text, return_tensors="pt")
16
 
17
  # out = model.generate(**inputs, clean_up_tokenization_spaces=True, max_length = 2400)
 
18
  out = model.generate(**inputs, max_length = 2400) # clean_up_tokenization_spaces=True)
 
19
  print(processor.decode(out[0], skip_special_tokens=True))
20
 
21
  # unconditional image captioning
 
15
  inputs = processor(raw_image, text, return_tensors="pt")
16
 
17
  # out = model.generate(**inputs, clean_up_tokenization_spaces=True, max_length = 2400)
18
+ decoded_output = tokenizer.decode(output_ids, clean_up_tokenization_spaces=True)
19
  out = model.generate(**inputs, max_length = 2400) # clean_up_tokenization_spaces=True)
20
+ decoded_output = tokenizer.decode(out, clean_up_tokenization_spaces=True)
21
  print(processor.decode(out[0], skip_special_tokens=True))
22
 
23
  # unconditional image captioning