Spaces:
Runtime error
Runtime error
Download fairseq/scripts/spm_train.py from ICML2022/OFA: direct link, hf CLI and curl.
- Browser
- Download file 431 Bytes
-
https://huggingface.co/spaces/ICML2022/OFA/resolve/main/fairseq/scripts/spm_train.py
- Command line
-
hf download hf://spaces/ICML2022/OFA/fairseq/scripts/spm_train.py
-
curl -L -o spm_train.py https://huggingface.co/spaces/ICML2022/OFA/resolve/main/fairseq/scripts/spm_train.py
431 Bytes
| #!/usr/bin/env python | |
| # Copyright (c) Facebook, Inc. and its affiliates. | |
| # All rights reserved. | |
| # | |
| # This source code is licensed under the license found in the | |
| # LICENSE file in the root directory of this source tree. | |
| from __future__ import absolute_import, division, print_function, unicode_literals | |
| import sys | |
| import sentencepiece as spm | |
| if __name__ == "__main__": | |
| spm.SentencePieceTrainer.Train(" ".join(sys.argv[1:])) | |