Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion gpt_2_simple/src/load_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ def load_dataset(enc, path, combine):
fp.readline() # skip header
reader = csv.reader(fp)
for row in reader:
raw_text += start_token + row[0] + end_token + "\n"
if row:
raw_text += start_token + row[0] + end_token + "\n"
else:
# Plain text
with open(path, 'r', encoding='utf8', errors='ignore') as fp:
Expand Down