sage-two-decoder / tokenizer_utils.py
Felipe Maya Muniz
Deploy FastAPI decoder with model
ecd1842
raw
history blame contribute delete
173 Bytes
import json
def load_index_to_word(path="index_to_word.json"):
with open(path, "r", encoding="utf-8") as f:
return {int(k): v for k, v in json.load(f).items()}