Spaces:
Sleeping
Sleeping
Download tokenizer_utils.py from gnai-creator/sage-two-decoder: direct link, hf CLI and curl.
- Browser
- Download file 173 Bytes
-
https://huggingface.co/spaces/gnai-creator/sage-two-decoder/resolve/main/tokenizer_utils.py
- Command line
-
hf download hf://spaces/gnai-creator/sage-two-decoder/tokenizer_utils.py
-
curl -L -o tokenizer_utils.py https://huggingface.co/spaces/gnai-creator/sage-two-decoder/resolve/main/tokenizer_utils.py
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()} | |