Text Classification
Transformers
Safetensors
English
bert_universal_classifier
feature-extraction
bert
insurance
universal
kinetic
riskguru
custom_code
Instructions to use injala/bert-universal-classifier-7class with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use injala/bert-universal-classifier-7class with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="injala/bert-universal-classifier-7class", trust_remote_code=True)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("injala/bert-universal-classifier-7class", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
BERT 7-Class Universal Page Classifier
Fine-tuned BERT model for classifying insurance document pages (Universal / Kinetic / RG / Wrap 7-class model).
Used for document-type signals when OpenAI classification is unavailable (e.g. Kinetic fallback) and for page routing in RG/Wrap pipelines.
Labels
| ID | Label |
|---|---|
| 0 | acord |
| 1 | contract |
| 2 | declaration |
| 3 | endorsements |
| 4 | forms |
| 5 | others |
| 6 | rating |
Usage (RunPod / Foundry / any HF runtime)
import os
import torch
from transformers import AutoTokenizer, AutoModel
repo = "injala/bert-universal-classifier-7class"
token = os.environ.get("HF_TOKEN")
tokenizer = AutoTokenizer.from_pretrained(repo, token=token)
model = AutoModel.from_pretrained(repo, token=token, trust_remote_code=True)
model.eval()
text = "ACORD 25 CERTIFICATE OF LIABILITY INSURANCE ..."
inputs = tokenizer(text, return_tensors="pt", truncation=True, max_length=512)
with torch.no_grad():
logits = model(**inputs)["logits"]
probs = torch.softmax(logits, dim=-1)
pred_id = probs.argmax(dim=-1).item()
label = model.config.id2label[str(pred_id)]
Note: Input should be full OCR page text (up to 512 tokens), not short snippets. Production uses ReLU on classifier logits (matches legacy BERT_Model inference).
Source
Exported from injala/rg_berts_21classes_7classes/best_model.pt.
- Downloads last month
- 19