Views
No views yet
1# Use a pipeline as a high-level helper
2from transformers import pipeline
3
4pipe = pipeline("text-classification", model="roberthsu2003/sentence_similarity")
5pipe({"text":"我喜歡台北", "text_pair":"台北是我喜歡的地方"})
6
7#=======output=====
8{'label': '相似', 'score': 0.8854433298110962}| Training Loss | Epoch | Step | Validation Loss | Accuracy | F1 |
|---|---|---|---|---|---|
| 0.2928 | 1.0 | 250 | 0.2737 | 0.887 | 0.8546 |
| 0.1815 | 2.0 | 500 | 0.2596 | 0.8985 | 0.8741 |
| 0.1203 | 3.0 | 750 | 0.3474 | 0.897 | 0.8652 |