diff --git a/Scripts/Training/bpe_trainer.py b/Scripts/Training/bpe_trainer.py index 759f397..904bfbf 100644 --- a/Scripts/Training/bpe_trainer.py +++ b/Scripts/Training/bpe_trainer.py @@ -86,7 +86,14 @@ def train(args: ProgramArgs): ) 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}")