Views
No views yet
| Metric | Score |
|---|---|
| Accuracy | 89% |
| F1-Score | 0.88 |
| Precision | 0.87 |
| Recall | 0.89 |
pip install transformers torch1from transformers import pipeline
2
3# Load the classifier
4classifier = pipeline(
5 "text-classification",
6 model="jeremiasdavison/it-support-ticket-classifier"
7)
8
9# Classify a ticket
10ticket = "My laptop won't connect to the office WiFi network"
11result = classifier(ticket)
12
13print(result)
14# Output: [{'label': 'NETWORK', 'score': 0.95}]1classifier = pipeline(
2 "text-classification",
3 model="jeremiasdavison/it-support-ticket-classifier",
4 return_all_scores=True
5)
6
7ticket = "I forgot my password and can't log into the system"
8results = classifier(ticket)[0]
9
10for result in results:
11 print(f"{result['label']}: {result['score']:.2%}")