File size: 915 Bytes
b786f3a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# Action Requirement Classifier

This repository contains a lightweight text classifier for predicting whether a message is:

- `action_required`
- `informational`
- `optional_action`

## What’s inside

- `classifier.joblib`: a scikit-learn classifier trained on SentenceTransformer embeddings
- `encoder/`: the SentenceTransformer encoder saved via `SentenceTransformer.save()`
- `metadata.json`: bundle metadata (model selection metric, encoder name, etc.)

## Quickstart (Python)

```python
import joblib
from sentence_transformers import SentenceTransformer

encoder = SentenceTransformer("./encoder")
clf = joblib.load("classifier.joblib")

texts = ["Please upload a clearer photo of your ID."]
emb = encoder.encode(texts)
pred = clf.predict(emb)
print(pred[0])
```

## Notes

- The classifier expects embeddings from the included `encoder/` directory.
- If you move files around, update paths accordingly.