Update load_data.py
Browse files- load_data.py +1 -1
load_data.py
CHANGED
|
@@ -55,7 +55,7 @@ class TextDataset(Dataset):
|
|
| 55 |
return torch.tensor(sequence, dtype=torch.long)
|
| 56 |
|
| 57 |
# Load the text from a file
|
| 58 |
-
with open('
|
| 59 |
text = file.read()
|
| 60 |
|
| 61 |
# Create the dataset
|
|
|
|
| 55 |
return torch.tensor(sequence, dtype=torch.long)
|
| 56 |
|
| 57 |
# Load the text from a file
|
| 58 |
+
with open('tiny-shakespeare.txt', 'r', encoding='utf-8') as file:
|
| 59 |
text = file.read()
|
| 60 |
|
| 61 |
# Create the dataset
|