Downloads · 30 days
31
14% of all-time downloads
Luigi/albert-tiny-chinese-dinercall-intent
albert-tiny-chinese-dinercall-intent is a text classification model from Luigi. Use it when you need a label for a piece of text. It is set up for transformers. The card lists the license as apache-2.0.
A binary intent classification model fine-tuned from ckiplab/albert-tiny-chinese on the Luigi/dinercall-intent dataset. This model identifies whether a Chinese restaurant phone call contains a reservation intent (labe…
Downloads · 30 days
31
14% of all-time downloads
All-time downloads
222
Public
Parameters
4.1M
332 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors16.3 MB · 74%
From the Hugging Face model README
A binary intent classification model fine-tuned from ckiplab/albert-tiny-chinese on the Luigi/dinercall-intent dataset. This model identifies whether a Chinese restaurant phone call contains a reservation intent (label=1) or not (label=0).
ckiplab/albert-tiny-chinese0: No intent to book a table1: Intent to make a reservationThis model is designed for voice AI assistants in restaurants to automatically identify reservation intents from spoken or transcribed customer sentences.
from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch
tokenizer = AutoTokenizer.from_pretrained("Luigi/albert-tiny-chinese-dinercall-intent")
model = AutoModelForSequenceClassification.from_pretrained("Luigi/albert-tiny-chinese-dinercall-intent")
inputs = tokenizer("你好,我想訂位,今天晚上七點兩位", return_tensors="pt")
with torch.no_grad():
logits = model(**inputs).logits
predicted = torch.argmax(logits, dim=-1).item()
print(f"Prediction: {'Reservation intent' if predicted == 1 else 'No intent'}")