Instructions to use Deepchecks/parrot_fluency_model_onnx with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Deepchecks/parrot_fluency_model_onnx with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="Deepchecks/parrot_fluency_model_onnx")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("Deepchecks/parrot_fluency_model_onnx") model = AutoModelForSequenceClassification.from_pretrained("Deepchecks/parrot_fluency_model_onnx") - Notebooks
- Google Colab
- Kaggle
Commit ·
374d521
1
Parent(s): f1fa289
Update README.md
Browse files
README.md
CHANGED
|
@@ -27,7 +27,10 @@ tokenizer = AutoTokenizer.from_pretrained('Deepchecks/parrot_fluency_model_onnx'
|
|
| 27 |
model = ORTModelForSequenceClassification.from_pretrained('Deepchecks/parrot_fluency_model_onnx')
|
| 28 |
|
| 29 |
# prepare the pipeline and generate inferences
|
| 30 |
-
|
|
|
|
|
|
|
|
|
|
| 31 |
res = pip(user_inputs, batch_size=64, truncation="only_first")
|
| 32 |
|
| 33 |
```
|
|
|
|
| 27 |
model = ORTModelForSequenceClassification.from_pretrained('Deepchecks/parrot_fluency_model_onnx')
|
| 28 |
|
| 29 |
# prepare the pipeline and generate inferences
|
| 30 |
+
user_inputs = ['Natural language processing is an interdisciplinary subfield of linguistics, computer science, and artificial intelligence.',
|
| 31 |
+
'Pass on what you have learned. Strength, mastery, hmm… but weakness, folly, failure, also. Yes, failure, most of all. The greatest teacher, failure is.',
|
| 32 |
+
'Whispering dreams, forgotten desires, chaotic thoughts, dance with words, meaning elusive, swirling amidst.']
|
| 33 |
+
pip = pipeline(task='text-classification', model=model, tokenizer=tokenizer, device=device, accelerator="ort")
|
| 34 |
res = pip(user_inputs, batch_size=64, truncation="only_first")
|
| 35 |
|
| 36 |
```
|