Upload generate_prompt.py with huggingface_hub
Browse files- 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_[
|
86 |
-
save_[
|
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_[
|
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:
|