| from transformers import pipeline | |
| # สร้างตัวดำเนินการสำหรับการจำแนกประเภทข้อความ | |
| classifier = pipeline("text-classification") | |
| # ทำนายประเภทข้อความ | |
| result = classifier("This is a text to classify") | |
| print(result) | |
| from transformers import pipeline | |
| # สร้างตัวดำเนินการสำหรับการจำแนกประเภทข้อความ | |
| classifier = pipeline("text-classification") | |
| # ทำนายประเภทข้อความ | |
| result = classifier("This is a text to classify") | |
| print(result) | |