Download version_check.py from katuni4ka/tiny-random-decilm: direct link, hf CLI and curl.
- Browser
- Download file 384 Bytes
-
https://huggingface.co/katuni4ka/tiny-random-decilm/resolve/main/version_check.py
- Command line
-
hf download hf://katuni4ka/tiny-random-decilm/version_check.py
-
curl -L -o version_check.py https://huggingface.co/katuni4ka/tiny-random-decilm/resolve/main/version_check.py
384 Bytes
| import transformers | |
| from packaging import version | |
| MIN_VERSION = "4.35.2" | |
| def check_transformers_version(): | |
| if version.parse(transformers.__version__) < version.parse(MIN_VERSION): | |
| raise ImportError( | |
| f"You are using transformers=={transformers.__version__}, but transformers>={MIN_VERSION} is required to use DeciLM. Please upgrade transformers." | |
| ) | |