AdrienB134 commited on
Commit
4c3be8d
1 Parent(s): ded88a4
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -41,8 +41,8 @@ def model_inference(
41
 
42
  BAD_WORDS_IDS = id_processor.tokenizer(["<image>", "<fake_token_around_image>"], add_special_tokens=False).input_ids
43
  EOS_WORDS_IDS = [id_processor.tokenizer.eos_token_id]
44
- images = [{"type": "image", "image": Image.open(image[0])} for image in images]
45
- images.append({"type": "text", "text": text})
46
  if text == "" and not images:
47
  gr.Error("Please input a query and optionally image(s).")
48
 
 
41
 
42
  BAD_WORDS_IDS = id_processor.tokenizer(["<image>", "<fake_token_around_image>"], add_special_tokens=False).input_ids
43
  EOS_WORDS_IDS = [id_processor.tokenizer.eos_token_id]
44
+ images = [Image.open(image[0]) for image in images]
45
+
46
  if text == "" and not images:
47
  gr.Error("Please input a query and optionally image(s).")
48