YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
CDTI Intent Classification Model
โมเดลนี้ใช้สำหรับการจำแนกเจตนา (Intent Classification) ของข้อความภาษาไทย โดยใช้ฐาน DistilBERT multilingual model
การใช้งาน
from transformers import AutoModelForSequenceClassification, AutoTokenizer
# โหลดโมเดลและ tokenizer
model_name = "YOUR_USERNAME/thai-intent-classification"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForSequenceClassification.from_pretrained(model_name)
# ทำนาย intent
def predict_intent(text):
inputs = tokenizer(text, return_tensors="pt", truncation=True, padding=True)
outputs = model(**inputs)
predicted_class = outputs.logits.argmax().item()
intent_mapping = ["Scholarship", "academic_calendar", "course", "general_question", "student_activities"]
return intent_mapping[predicted_class]
# ตัวอย่างการใช้งาน
text = "ช่วงไหนเปิดเทอม"
intent = predict_intent(text)
print(f"Intent: {intent}")
รายละเอียดโมเดล
- ฐานโมเดล: distilbert-base-multilingual-cased
- ภาษาที่รองรับ: ภาษาไทย
- จำนวน Intent: 5 ประเภท
- เทรนด้วยข้อมูล: ข้อความภาษาไทยเกี่ยวกับคำถามทั่วไปในสถาบันการศึกษาอย่างละ 100 ข้อ
- Downloads last month
- 10
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support