andrewqian123
commited on
Commit
•
e720fb3
1
Parent(s):
ce88284
Hopefully can process list of images now.
Browse files- modeling_minicpmv.py +3 -2
modeling_minicpmv.py
CHANGED
@@ -297,8 +297,9 @@ class MiniCPMV(MiniCPMVPreTrainedModel):
|
|
297 |
|
298 |
if image is not None and isinstance(copy_msgs[0]["content"], str):
|
299 |
# copy_msgs[0]['content'] = '(<image>./</image>)\n' + copy_msgs[0]['content']
|
300 |
-
copy_msgs[0]["content"] = [image, copy_msgs[0]["content"]]
|
301 |
-
|
|
|
302 |
images = []
|
303 |
for i, msg in enumerate(copy_msgs):
|
304 |
role = msg["role"]
|
|
|
297 |
|
298 |
if image is not None and isinstance(copy_msgs[0]["content"], str):
|
299 |
# copy_msgs[0]['content'] = '(<image>./</image>)\n' + copy_msgs[0]['content']
|
300 |
+
#copy_msgs[0]["content"] = [image, copy_msgs[0]["content"]]
|
301 |
+
#copy_msgs[0]["content"] = [image, copy_msgs[0]["content"]]
|
302 |
+
copy_msgs[0]["content"].insert(-1, im)
|
303 |
images = []
|
304 |
for i, msg in enumerate(copy_msgs):
|
305 |
role = msg["role"]
|