Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -196,10 +196,10 @@ def answer_question(images, question):
|
|
| 196 |
gen_model.to(device)
|
| 197 |
|
| 198 |
print("model load success!")
|
| 199 |
-
|
| 200 |
-
print(images[0])
|
| 201 |
|
| 202 |
-
|
|
|
|
|
|
|
| 203 |
|
| 204 |
msgs = [{'role': 'user', 'content': [*images_, question]}]
|
| 205 |
|
|
|
|
| 196 |
gen_model.to(device)
|
| 197 |
|
| 198 |
print("model load success!")
|
|
|
|
|
|
|
| 199 |
|
| 200 |
+
# here each element of images is a tuple of (image_path, None).
|
| 201 |
+
|
| 202 |
+
images_ = [Image.open(image[0]).convert('RGB') for image in images]
|
| 203 |
|
| 204 |
msgs = [{'role': 'user', 'content': [*images_, question]}]
|
| 205 |
|