Update README.md
Browse files
README.md
CHANGED
|
@@ -1,28 +1,37 @@
|
|
| 1 |
-
-
|
| 2 |
-
license: mit
|
| 3 |
-
---
|
| 4 |
-
# ModernBERT-CritiQ
|
| 5 |
-
|
| 6 |
-
This model fine-tunes [ModernBERT-base](https://huggingface.co/answerdotai/ModernBERT-base) to classify critical questions as either:
|
| 7 |
|
| 8 |
-
|
| 9 |
-
- ❌ **Non-Useful** (label = 0)
|
| 10 |
|
| 11 |
-
|
| 12 |
|
| 13 |
-
|
| 14 |
|
| 15 |
-
##
|
| 16 |
|
| 17 |
-
|
|
|
|
|
|
|
| 18 |
|
| 19 |
-
##
|
| 20 |
|
| 21 |
```python
|
| 22 |
from transformers import pipeline
|
| 23 |
|
| 24 |
classifier = pipeline("text-classification", model="MidhunKanadan/ModernBERT-CritiQ")
|
| 25 |
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
## 🔍 ModernBERT-CritiQ: Critical Question Usefulness Classifier
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
|
| 3 |
+
This model classifies **critical questions** as either `Useful` or `Non-Useful` in the context of an argument (intervention). It is fine-tuned on Critical Question Generation datasets using a ModernBERT architecture with extended context.
|
|
|
|
| 4 |
|
| 5 |
+
---
|
| 6 |
|
| 7 |
+
## 💡 How to Use
|
| 8 |
|
| 9 |
+
### 🛠 Install Dependencies
|
| 10 |
|
| 11 |
+
```bash
|
| 12 |
+
pip install transformers
|
| 13 |
+
```
|
| 14 |
|
| 15 |
+
### 🚀 Run with HuggingFace `pipeline`
|
| 16 |
|
| 17 |
```python
|
| 18 |
from transformers import pipeline
|
| 19 |
|
| 20 |
classifier = pipeline("text-classification", model="MidhunKanadan/ModernBERT-CritiQ")
|
| 21 |
|
| 22 |
+
intervention = "Investing in public transport reduces carbon emissions and benefits everyone."
|
| 23 |
+
question = "What about the costs of implementing this system?"
|
| 24 |
+
|
| 25 |
+
text = f"Intervention: {intervention} [SEP] Critical Question: {question}"
|
| 26 |
+
result = classifier(text)[0]
|
| 27 |
+
|
| 28 |
+
print(f"Label: {result['label']}, Confidence: {result['score']:.4f}")
|
| 29 |
+
```
|
| 30 |
+
|
| 31 |
+
---
|
| 32 |
+
|
| 33 |
+
## 🧠 Expected Output
|
| 34 |
+
|
| 35 |
+
```
|
| 36 |
+
Label: Useful, Confidence: 0.9539
|
| 37 |
+
```
|