chendl commited on
Commit
263fdaf
1 Parent(s): bb8b56a

update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -119,7 +119,7 @@ def generate(
119
  image = image.resize((224, 224))
120
  batch_images = image_processor(image).unsqueeze(0).unsqueeze(1).unsqueeze(0)
121
  if idx == 1:
122
- prompt = [f"{tokenizer.bos_token}<|#image#|>{tokenizer.pad_token * vis_embed_size}<|#endofimage#|><|#object#|>{text.rstrip('.').strip()}<|#endofobject#|><|#visual#|>"]
123
  bad_words_ids = None
124
  max_generation_length = 5
125
  else:
 
119
  image = image.resize((224, 224))
120
  batch_images = image_processor(image).unsqueeze(0).unsqueeze(1).unsqueeze(0)
121
  if idx == 1:
122
+ prompt = [f"{tokenizer.bos_token}<|#image#|>{tokenizer.pad_token * vis_embed_size}<|#endofimage#|><|#object#|> {text.rstrip('.').strip()}<|#endofobject#|><|#visual#|>"]
123
  bad_words_ids = None
124
  max_generation_length = 5
125
  else: