Ashishkr commited on
Commit
b578004
1 Parent(s): 87f2b37

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +14 -13
README.md CHANGED
@@ -33,19 +33,20 @@ Sentence 4 has a subject-verb agreement error.
33
  **example_usage:**
34
  *library: HuggingFace transformers*
35
  ```python
36
- from transformers import AutoTokenizer, AutoModelForSequenceClassification
37
- tokenizer = AutoTokenizer.from_pretrained("salesken/query_wellformedness_score")
38
- model = AutoModelForSequenceClassification.from_pretrained("salesken/query_wellformedness_score")
39
- sentences = [
40
- 'what was the reason for everyone to leave the company',
41
- 'What was the reason behind everyone leaving the company',
42
- # ... other sentences
43
- ]
44
- features = tokenizer(sentences, padding=True, truncation=True, return_tensors="pt")
45
- model.eval()
46
- with torch.no_grad():
47
- scores = model(**features).logits
48
- print(scores)
 
49
  ```
50
 
51
  **Intended Use Cases**
 
33
  **example_usage:**
34
  *library: HuggingFace transformers*
35
  ```python
36
+ import torch
37
+ from transformers import AutoTokenizer, AutoModelForSequenceClassification
38
+ tokenizer = AutoTokenizer.from_pretrained("salesken/query_wellformedness_score")
39
+ model = AutoModelForSequenceClassification.from_pretrained("salesken/query_wellformedness_score")
40
+ sentences = [
41
+ 'what was the reason for everyone to leave the company',
42
+ 'What was the reason behind everyone leaving the company',
43
+ # ... other sentences
44
+ ]
45
+ features = tokenizer(sentences, padding=True, truncation=True, return_tensors="pt")
46
+ model.eval()
47
+ with torch.no_grad():
48
+ scores = model(**features).logits
49
+ print(scores)
50
  ```
51
 
52
  **Intended Use Cases**