Download example.py from failed09/bashkir-diacritics-restorer: direct link, hf CLI and curl.
- Browser
- Download file 375 Bytes
-
https://huggingface.co/failed09/bashkir-diacritics-restorer/resolve/main/example.py
- Command line
-
hf download hf://failed09/bashkir-diacritics-restorer/example.py
-
curl -L -o example.py https://huggingface.co/failed09/bashkir-diacritics-restorer/resolve/main/example.py
375 Bytes
| import sys | |
| from pathlib import Path | |
| from runtime import BashkirDiacriticsRestorer | |
| if hasattr(sys.stdout, "reconfigure"): | |
| sys.stdout.reconfigure(encoding="utf-8") | |
| model = BashkirDiacriticsRestorer(Path(__file__).parent) | |
| for text in ("мин башкортса хойлэшэм", "казакстан", "hello world iPhone"): | |
| print(f"{text} -> {model.restore(text)}") | |