Ashishkr commited on
Commit
8758d51
1 Parent(s): d0e4485

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +30 -0
README.md ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+
3
+ license: apache-2.0
4
+ inference: false
5
+
6
+ datasets: google_wellformed_query
7
+ ---
8
+
9
+ This model
10
+ ```
11
+ from transformers import AutoTokenizer, AutoModelForSequenceClassification
12
+ tokenizer = AutoTokenizer.from_pretrained("salesken/query_wellformedness_score")
13
+ model = AutoModelForSequenceClassification.from_pretrained("salesken/query_wellformedness_score")
14
+ sentences = [' what was the reason for everyone to leave the company ',
15
+ ' What was the reason behind everyone leaving the company ',
16
+ ' why was everybody leaving the company ',
17
+ ' what was the reason to everyone leave the company ',
18
+ ' what be the reason for everyone to leave the company ',
19
+ ' what was the reasons for everyone to leave the company ',
20
+ ' what were the reasons for everyone to leave the company ']
21
+
22
+ features = tokenizer(corrected_sentences, padding=True, truncation=True, return_tensors="pt")
23
+ model.eval()
24
+ with torch.no_grad():
25
+ scores = model(**features).logits
26
+ print(scores)
27
+
28
+ ```
29
+
30
+