Update README.md
Browse files
README.md
CHANGED
|
@@ -5,4 +5,15 @@ language:
|
|
| 5 |
metrics:
|
| 6 |
- f1
|
| 7 |
pipeline_tag: text-classification
|
| 8 |
-
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
metrics:
|
| 6 |
- f1
|
| 7 |
pipeline_tag: text-classification
|
| 8 |
+
---
|
| 9 |
+
|
| 10 |
+
## Usage
|
| 11 |
+
```python
|
| 12 |
+
from transformers import AutoTokenizer, AutoModelForSequenceClassification, pipeline
|
| 13 |
+
|
| 14 |
+
tokenizer = AutoTokenizer.from_pretrained("zeusfsx/title-instruction")
|
| 15 |
+
model = AutoModelForSequenceClassification.from_pretrained("zeusfsx/title-instruction")
|
| 16 |
+
|
| 17 |
+
|
| 18 |
+
classification = pipeline("text-classification", model=model, tokenizer=tokenizer, device="mps") # for mac I used mps
|
| 19 |
+
```
|