Fixed JSON incompatibility
This commit is contained in:
parent
9a8e726d74
commit
97bac464f3
@ -86,7 +86,14 @@ def train(args: ProgramArgs):
|
|||||||
)
|
)
|
||||||
|
|
||||||
VOCABULARY = BPE_ENCODER.vocabulary
|
VOCABULARY = BPE_ENCODER.vocabulary
|
||||||
VOCABULARY_JSON = json.dumps(VOCABULARY)
|
|
||||||
|
JSON_VOCABULARY: dict[str, int]= {}
|
||||||
|
|
||||||
|
for key, item in VOCABULARY.items():
|
||||||
|
TUPLE_STR = f"{key}"
|
||||||
|
JSON_VOCABULARY[TUPLE_STR] = item
|
||||||
|
|
||||||
|
VOCABULARY_JSON = json.dumps(JSON_VOCABULARY)
|
||||||
|
|
||||||
print(f"Saving Vocabulary in {VOCABULARY_PATH}")
|
print(f"Saving Vocabulary in {VOCABULARY_PATH}")
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user