Text Classification
MLX
Safetensors
Laya
Polish
English
devops
decision-model
apple-silicon
experimental
synthetic-data
claude-code
litellm
Instructions to use tebebe/laya-devops-mlx with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use tebebe/laya-devops-mlx with MLX:
# Download the model from the Hub pip install huggingface_hub[hf_xet] hf download tebebe/laya-devops-mlx --local-dir laya-devops-mlx
- Laya
How to use tebebe/laya-devops-mlx with Laya:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Atomic Chat
Download input-preprocessing-loader-source.py from tebebe/laya-devops-mlx: direct link, hf CLI and curl.
- Browser
- Download file 1.24 kB
-
https://huggingface.co/tebebe/laya-devops-mlx/resolve/main/input-preprocessing-loader-source.py
- Command line
-
hf download hf://tebebe/laya-devops-mlx/input-preprocessing-loader-source.py
-
curl -L -o input-preprocessing-loader-source.py https://huggingface.co/tebebe/laya-devops-mlx/resolve/main/input-preprocessing-loader-source.py
1.24 kB
| """Load only the explicitly allowed, hash-verified local preprocessing code.""" | |
| import hashlib | |
| import importlib | |
| from pathlib import Path | |
| ROOT=Path(__file__).resolve().parent | |
| ALLOWED={'command_normalizer':set(),'command_canonicalizer':{'command_normalizer.py'},'command_normalizer_v2':set(),'command_canonicalizer_v2':{'command_normalizer_v2.py'}} | |
| def load_preprocessor(metadata): | |
| name=metadata.get('module') | |
| if name not in ALLOWED:raise ValueError('Unrecognized input preprocessing module') | |
| file=ROOT/(name+'.py') | |
| if hashlib.sha256(file.read_bytes()).hexdigest()!=metadata.get('sha256'):raise ValueError('Input preprocessing source mismatch') | |
| dependencies=metadata.get('dependencies',{}) | |
| if set(dependencies)!=ALLOWED[name]:raise ValueError('Input preprocessing dependencies mismatch') | |
| for filename,expected in dependencies.items(): | |
| if hashlib.sha256((ROOT/filename).read_bytes()).hexdigest()!=expected:raise ValueError('Input preprocessing dependency source mismatch') | |
| module=importlib.import_module(name) | |
| if Path(module.__file__).resolve()!=file or module.VERSION!=metadata.get('version'):raise ValueError('Input preprocessing module identity mismatch') | |
| return module.normalize_state | |