MidhunKanadan commited on
Commit
a5716b0
·
verified ·
1 Parent(s): 4c28cbc

Upload README.md

Browse files
Files changed (1) hide show
  1. README.md +45 -0
README.md CHANGED
@@ -1,3 +1,48 @@
1
  ---
2
  license: mit
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: mit
3
  ---
4
+ # ModernBERT-base-critical-question-binary-classifier
5
+
6
+ This model is a fine-tuned version of [`answerdotai/ModernBERT-base`] for **binary** classification of critical questions about an argument (intervention).
7
+
8
+ It takes an *intervention* (the argument) and a *critical question* about that intervention, and predicts whether the question is **Useful** or **Non-Useful**.
9
+
10
+ This binary version collapses the original 3 labels
11
+
12
+ - `Useful`
13
+ - `Unhelpful`
14
+ - `Invalid`
15
+
16
+ into
17
+
18
+ - `Useful` (1)
19
+ - `Non-Useful` (0) ← this is both `Unhelpful` and `Invalid`
20
+
21
+ The model was trained on long inputs, so the format and truncation settings matter.
22
+
23
+ ---
24
+
25
+ ## Usage
26
+
27
+ ```python
28
+ from transformers import pipeline
29
+
30
+ model_id = "MidhunKanadan/ModernBERT-base-critical-question-binary-classifier"
31
+
32
+ classifier = pipeline(
33
+ "text-classification",
34
+ model=model_id,
35
+ truncation=True,
36
+ max_length=2048,
37
+ return_all_scores=True # so we see both Useful and Non-Useful
38
+ )
39
+
40
+ intervention = "CLINTON: \"The central question in this election is really what kind of country we want to be and what kind of future we 'll build together\nToday is my granddaughter 's second birthday\nI think about this a lot\nwe have to build an economy that works for everyone , not just those at the top\nwe need new jobs , good jobs , with rising incomes\nI want us to invest in you\nI want us to invest in your future\njobs in infrastructure , in advanced manufacturing , innovation and technology , clean , renewable energy , and small business\nmost of the new jobs will come from small business\nWe also have to make the economy fairer\nThat starts with raising the national minimum wage and also guarantee , finally , equal pay for women 's work\nI also want to see more companies do profit-sharing\"",
41
+
42
+ critical_question = "Could Clinton investing in you have consequences that we should take into account? Is it practically possible?"
43
+
44
+ text = f"Intervention: {intervention} [SEP] Critical Question: {critical_question}"
45
+
46
+ results = classifier(text)[0]
47
+ for r in results:
48
+ print(f"{r['label']}: {r['score']:.4f}")