Skip to content

Commit ef06854

Browse files
committed
fix path error
1 parent 7dec543 commit ef06854

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

GPT2/encoder.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,9 @@ def decode(self, tokens):
105105
return text
106106

107107
def get_encoder():
108-
with open(os.path.join('encoder.json'), 'r') as f:
108+
with open('./GPT2/encoder.json', 'r') as f:
109109
encoder = json.load(f)
110-
with open(os.path.join('vocab.bpe'), 'r', encoding="utf-8") as f:
110+
with open('./GPT2/vocab.bpe', 'r', encoding="utf-8") as f:
111111
bpe_data = f.read()
112112
bpe_merges = [tuple(merge_str.split()) for merge_str in bpe_data.split('\n')[1:-1]]
113113
return Encoder(

0 commit comments

Comments
 (0)