Update README.md
Browse files
README.md
CHANGED
|
@@ -33,6 +33,10 @@ tokenizer = AutoTokenizer.from_pretrained("castelao/pvi-issue-classification")
|
|
| 33 |
# Example usage
|
| 34 |
inputs = tokenizer("NEC 110.26 specifies working space clearance about electrical equipment.", return_tensors="pt")
|
| 35 |
outputs = model(**inputs)
|
|
|
|
|
|
|
|
|
|
|
|
|
| 36 |
```
|
| 37 |
|
| 38 |
## Training Details
|
|
|
|
| 33 |
# Example usage
|
| 34 |
inputs = tokenizer("NEC 110.26 specifies working space clearance about electrical equipment.", return_tensors="pt")
|
| 35 |
outputs = model(**inputs)
|
| 36 |
+
|
| 37 |
+
logits = outputs.logits
|
| 38 |
+
predicted_class_id = logits.argmax().item()
|
| 39 |
+
print(model.config.id2label[predicted_class_id])
|
| 40 |
```
|
| 41 |
|
| 42 |
## Training Details
|