Update README.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,47 @@
|
|
| 1 |
-
---
|
| 2 |
-
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
library_name: transformers
|
| 3 |
+
tags:
|
| 4 |
+
- text-classification
|
| 5 |
+
- bert
|
| 6 |
+
- query-routing
|
| 7 |
+
- sklearn
|
| 8 |
+
- mlp
|
| 9 |
+
license: unknown
|
| 10 |
+
language:
|
| 11 |
+
- en
|
| 12 |
+
pipeline_tag: text-classification
|
| 13 |
+
---
|
| 14 |
+
# Freakdivi β BERT Query Router
|
| 15 |
+
|
| 16 |
+
## Model Description
|
| 17 |
+
|
| 18 |
+
A BERT-based sequence classification model that routes natural-language queries into predefined categories.
|
| 19 |
+
The model encodes each query with **bert-base-uncased** and feeds the `[CLS]` embedding to a scikit-learn MLP classifier.
|
| 20 |
+
|
| 21 |
+
This repository contains:
|
| 22 |
+
|
| 23 |
+
- `mlp_query_classifier.joblib` β trained MLP classifier
|
| 24 |
+
- `scaler_query_classifier.joblib` β feature scaler used on BERT embeddings
|
| 25 |
+
- `label_encoder_query_classifier.joblib` β maps class indices β string labels
|
| 26 |
+
- `inference.py` β handler used by Hugging Face Inference Endpoints
|
| 27 |
+
|
| 28 |
+
> β οΈ **TODO:** Replace the task + label descriptions below with your actual ones.
|
| 29 |
+
|
| 30 |
+
---
|
| 31 |
+
|
| 32 |
+
## Task
|
| 33 |
+
|
| 34 |
+
**Multi-class text classification / query routing**
|
| 35 |
+
|
| 36 |
+
Given an input query, the model predicts one of *N* categories, such as:
|
| 37 |
+
|
| 38 |
+
| ID | Label | Description |
|
| 39 |
+
|----|--------------|------------------------------------------|
|
| 40 |
+
| 0 | `LABEL_0` π | *TODO: short description of label 0* |
|
| 41 |
+
| 1 | `LABEL_1` π | *TODO: short description of label 1* |
|
| 42 |
+
| 2 | `LABEL_2` π | *TODO: short description of label 2* |
|
| 43 |
+
| 3 | `LABEL_3` π | *TODO: add/remove rows as needed* |
|
| 44 |
+
|
| 45 |
+
You can get the exact list of labels by checking the `label_encoder_query_classifier.joblib` in code:
|
| 46 |
+
|
| 47 |
+
```
|