Text Classification
Transformers
Joblib
ONNX
Safetensors
English
bert
masterformat
masterformat-classifier
csi-masterformat
construction
construction-technology
sequence-classification
tfidf
ensemble
specs
spec-writing
specifications
takeoff
estimating
cost-code
ufgs
public-domain
Eval Results (legacy)
text-embeddings-inference
Instructions to use constructelligence/masterformat-classifier with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use constructelligence/masterformat-classifier with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="constructelligence/masterformat-classifier")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("constructelligence/masterformat-classifier") model = AutoModelForSequenceClassification.from_pretrained("constructelligence/masterformat-classifier", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download predict.py from constructelligence/masterformat-classifier: direct link, hf CLI and curl.
- Browser
- Download file 691 Bytes
-
https://huggingface.co/constructelligence/masterformat-classifier/resolve/3ccb233d52512217d1aaedd855f71180fc4f4084/predict.py
- Command line
-
hf download hf://constructelligence/masterformat-classifier@3ccb233d52512217d1aaedd855f71180fc4f4084/predict.py
-
curl -L -o predict.py https://huggingface.co/constructelligence/masterformat-classifier/resolve/3ccb233d52512217d1aaedd855f71180fc4f4084/predict.py
691 Bytes
| """Classify construction text into MasterFormat level-2 groups. | |
| pip install transformers torch | |
| python predict.py "4000 psi concrete slab on grade" "TPO roofing, 60 mil, fully adhered" | |
| Without arguments it classifies one example line item. | |
| """ | |
| import sys | |
| from transformers import pipeline | |
| MODEL = "constructelligence/masterformat-classifier" | |
| def main(): | |
| texts = sys.argv[1:] or ["4000 psi concrete slab on grade"] | |
| clf = pipeline("text-classification", model=MODEL, top_k=3) | |
| for text, preds in zip(texts, clf(texts)): | |
| print(f"\n{text}") | |
| for p in preds: | |
| print(f" {p['label']:64s} {p['score']:.3f}") | |
| if __name__ == "__main__": | |
| main() | |