Instructions to use Ashishkr/query_wellformedness_score with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Ashishkr/query_wellformedness_score with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="Ashishkr/query_wellformedness_score")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("Ashishkr/query_wellformedness_score") model = AutoModelForSequenceClassification.from_pretrained("Ashishkr/query_wellformedness_score", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -38,10 +38,13 @@ 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 |
-
|
| 42 |
-
|
| 43 |
-
|
|
|
|
|
|
|
| 44 |
]
|
|
|
|
| 45 |
features = tokenizer(sentences, padding=True, truncation=True, return_tensors="pt")
|
| 46 |
model.eval()
|
| 47 |
with torch.no_grad():
|
|
|
|
| 38 |
tokenizer = AutoTokenizer.from_pretrained("salesken/query_wellformedness_score")
|
| 39 |
model = AutoModelForSequenceClassification.from_pretrained("salesken/query_wellformedness_score")
|
| 40 |
sentences = [
|
| 41 |
+
"The quarterly financial report are showing an increase.", # Incorrect
|
| 42 |
+
"Him has completed the audit for last fiscal year.", # Incorrect
|
| 43 |
+
"Please to inform the board about the recent developments.", # Incorrect
|
| 44 |
+
"The team successfully achieved all its targets for the last quarter.", # Correct
|
| 45 |
+
"Our company is exploring new ventures in the European market." # Correct
|
| 46 |
]
|
| 47 |
+
|
| 48 |
features = tokenizer(sentences, padding=True, truncation=True, return_tensors="pt")
|
| 49 |
model.eval()
|
| 50 |
with torch.no_grad():
|