andrewqian123 commited on
Commit
35f8d11
1 Parent(s): a03d6de

Update modeling_minicpmv.py

Browse files
Files changed (1) hide show
  1. modeling_minicpmv.py +3 -2
modeling_minicpmv.py CHANGED
@@ -299,8 +299,9 @@ class MiniCPMV(MiniCPMVPreTrainedModel):
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"] = [copy_msgs[0]["content"]]
303
- copy_msgs[0]["content"].insert(-1, im)
 
304
  images = []
305
  for i, msg in enumerate(copy_msgs):
306
  role = msg["role"]
 
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
+ for im in image:
303
+ copy_msgs[0]["content"] = [copy_msgs[0]["content"]]
304
+ copy_msgs[0]["content"].insert(-1, im)
305
  images = []
306
  for i, msg in enumerate(copy_msgs):
307
  role = msg["role"]