Text Classification
Transformers
ONNX
Safetensors
llama
safety
content-moderation
multi-label
multilingual
tiny-language-model
from-scratch
distilled
text-embeddings-inference
Instructions to use KucLab/Barist.6 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use KucLab/Barist.6 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="KucLab/Barist.6")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("KucLab/Barist.6") model = AutoModelForSequenceClassification.from_pretrained("KucLab/Barist.6", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download tests/test_regex_gate.py from KucLab/Barist.6: direct link, hf CLI and curl.
- Browser
- Download file 490 Bytes
-
https://huggingface.co/KucLab/Barist.6/resolve/main/tests/test_regex_gate.py
- Command line
-
hf download hf://KucLab/Barist.6/tests/test_regex_gate.py
-
curl -L -o test_regex_gate.py https://huggingface.co/KucLab/Barist.6/resolve/main/tests/test_regex_gate.py
490 Bytes
| import json, subprocess, sys | |
| from pathlib import Path | |
| ROOT = Path(__file__).resolve().parent.parent | |
| def test_regex_gate_passes(): | |
| r = subprocess.run([sys.executable, str(ROOT / "scripts/test_regex.py")], | |
| capture_output=True, text=True, cwd=ROOT) | |
| assert r.returncode == 0, r.stdout + r.stderr | |
| rep = json.loads((ROOT / "reports/regex_gate.json").read_text()) | |
| assert rep["n_benign"] >= 200 | |
| assert rep["hard_FP"] == 0 | |
| assert rep["misses"] == [] | |