Commit
·
23efd80
1
Parent(s):
ecaa6c5
Upload 2 files
Browse files- convert.py +2 -2
- train.csv +0 -0
convert.py
CHANGED
@@ -18,8 +18,8 @@ with open(output_file, 'w', newline='', encoding='utf-8') as csvfile:
|
|
18 |
|
19 |
# Use a loop to combine prompt and continuation in the same column with appropriate tags
|
20 |
for i in range(len(paragraphs)):
|
21 |
-
prompt = '###Human
|
22 |
-
continuation = '###Assistant
|
23 |
|
24 |
# Combine the prompt and continuation in the same column and write to the CSV
|
25 |
csv_writer.writerow([prompt.strip() + ' ' + continuation.strip()])
|
|
|
18 |
|
19 |
# Use a loop to combine prompt and continuation in the same column with appropriate tags
|
20 |
for i in range(len(paragraphs)):
|
21 |
+
prompt = '###Human:' + ' '.join(paragraphs[i:i + 2]) # Combine two paragraphs for the prompt
|
22 |
+
continuation = '###Assistant:' + ' '.join(paragraphs[i + 2:i + 7]) # Combine five paragraphs for the continuation
|
23 |
|
24 |
# Combine the prompt and continuation in the same column and write to the CSV
|
25 |
csv_writer.writerow([prompt.strip() + ' ' + continuation.strip()])
|
train.csv
CHANGED
The diff for this file is too large to render.
See raw diff
|
|