Wendy-Fly commited on
Commit
5c91f80
·
verified ·
1 Parent(s): 656cc39

Upload generate_prompt.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. generate_prompt.py +3 -3
generate_prompt.py CHANGED
@@ -82,8 +82,8 @@ for batch_idx in tqdm(range(begin, end, batch_size)):
82
  }
83
  #idx_real = batch_idx * batch_size + idx
84
  messages = batch[idx]
85
- save_[0]['content'][0]['image'] = messages['content'][0]['image']
86
- save_[0]['content'][1]['text'] = messages['content'][1]['text']
87
 
88
  data_list.append(messages)
89
  save_list.append(save_)
@@ -110,7 +110,7 @@ for batch_idx in tqdm(range(begin, end, batch_size)):
110
  generated_ids_trimmed, skip_special_tokens=True, clean_up_tokenization_spaces=False
111
  )
112
  #print(output_text)
113
- save_[0]['result'] = output_text
114
  save_data.append(save_)
115
 
116
  if batch_idx % 4 ==0:
 
82
  }
83
  #idx_real = batch_idx * batch_size + idx
84
  messages = batch[idx]
85
+ save_['content'][0]['image'] = messages['content'][0]['image']
86
+ save_['content'][1]['text'] = messages['content'][1]['text']
87
 
88
  data_list.append(messages)
89
  save_list.append(save_)
 
110
  generated_ids_trimmed, skip_special_tokens=True, clean_up_tokenization_spaces=False
111
  )
112
  #print(output_text)
113
+ save_['result'] = output_text
114
  save_data.append(save_)
115
 
116
  if batch_idx % 4 ==0: