Views
No views yet
1>>> from transformers import pipeline
2>>> import torch
3>>> bert_ckpt = "seddiktrk/distilbert-base-uncased-finetuned-clinc"
4>>> device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
5>>> pipe = pipeline("text-classification", model=bert_ckpt, device=device)
6
7
8>>> query = """Hey, I'd like to rent a vehicle from Nov 1st to Nov 15th in Paris and I need a 15 passenger van"""
9>>> print(pipe(query))
10
11[{'label': 'car_rental', 'score': 0.5490034222602844}]| Training Loss | Epoch | Step | Validation Loss | Accuracy |
|---|---|---|---|---|
| No log | 1.0 | 318 | 3.2931 | 0.7255 |
| 3.8009 | 2.0 | 636 | 1.8849 | 0.8526 |
| 3.8009 | 3.0 | 954 | 1.1702 | 0.8897 |
| 1.7128 | 4.0 | 1272 | 0.8717 | 0.9145 |
| 0.9206 | 5.0 | 1590 | 0.7872 | 0.9206 |