|
Download README.md from commure-smislam/email-classification-simple: direct link, hf CLI and curl.
- Browser
- Download file 1.17 kB
-
https://huggingface.co/commure-smislam/email-classification-simple/resolve/main/README.md
- Command line
-
hf download hf://commure-smislam/email-classification-simple/README.md
-
curl -L -o README.md https://huggingface.co/commure-smislam/email-classification-simple/resolve/main/README.md
1.17 kB
| # Email Classification Model (Simple Version) | |
| A dual-head transformer model for classifying healthcare emails into categories and subcategories. | |
| ## Model Details | |
| - **Base Model**: distilbert-base-uncased | |
| - **Categories**: 6 | |
| - **Subcategories**: 14 | |
| ## Categories | |
| appointments, denials, eligibility, other, patient_balance, submission | |
| ## Usage | |
| ```python | |
| import torch | |
| from transformers import AutoModel, AutoTokenizer | |
| # Download the inference script | |
| # wget https://huggingface.co/commure-smislam/email-classification-simple/resolve/main/inference.py | |
| from inference import EmailClassifierInference | |
| # Load model | |
| classifier = EmailClassifierInference("./") | |
| # Predict | |
| result = classifier.predict("Patient appointment confirmation for tomorrow") | |
| print(result) | |
| ``` | |
| ## Expected Output | |
| ```json | |
| { | |
| "text": "Patient appointment confirmation for tomorrow", | |
| "category": {"label": "appointments", "confidence": 0.95}, | |
| "subcategory": {"label": "appointments.confirmation", "confidence": 0.92} | |
| } | |
| ``` | |
| ## Files | |
| - `backbone/`: Base transformer model | |
| - `tokenizer/`: Tokenizer files | |
| - `classification_heads.pt`: Classification layer weights | |
| - `inference.py`: Inference script | |