Wendy-Fly commited on
Commit
c543d24
·
verified ·
1 Parent(s): a7a2726

Upload infer_qwen2_vl.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. infer_qwen2_vl.py +2 -2
infer_qwen2_vl.py CHANGED
@@ -71,9 +71,9 @@ for batch_idx in tqdm(range(begin, end, batch_size)):
71
  print(f"data index range : {batch_idx} ~ {min(batch_idx + batch_size, end)}")
72
  image_inputs_batch, video_inputs_batch = [], []
73
  for idx,i in enumerate(batch):
74
- img = batch[i]
75
  print('gain image successfully !')
76
- messages[1]["content"][0]["image"] = img
77
  text = processor.apply_chat_template(
78
  messages, tokenize=False, add_generation_prompt=True
79
  )
 
71
  print(f"data index range : {batch_idx} ~ {min(batch_idx + batch_size, end)}")
72
  image_inputs_batch, video_inputs_batch = [], []
73
  for idx,i in enumerate(batch):
74
+ #img = batch[i]
75
  print('gain image successfully !')
76
+ messages[1]["content"][0]["image"] = i
77
  text = processor.apply_chat_template(
78
  messages, tokenize=False, add_generation_prompt=True
79
  )