Spaces:
Sleeping
Sleeping
AdrienB134
commited on
Commit
•
4c3be8d
1
Parent(s):
ded88a4
rtgtr
Browse files
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 = [
|
45 |
-
|
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 |
|