Views
No views yet
add_contact - Add new contact with name, phone, email, address, birthdayedit_phone - Update contact's phone numberedit_email - Update contact's email addressedit_address - Update contact's addressdelete_contact - Delete a contactshow_contact - Show details of a specific contactshow_contacts - List all contactssearch_contacts - Search for contactsadd_note - Add a note to a contactshow_notes - Show all notes or notes for a contactedit_note - Edit an existing notedelete_note - Delete a noteadd_tag - Add a tag to a contactremove_tag - Remove a tag from a contactshow_birthdays - Show upcoming birthdayshelp - Show help messageexit - Exit the application1from transformers import AutoTokenizer, AutoModelForSequenceClassification, pipeline
2
3# Load model and tokenizer
4tokenizer = AutoTokenizer.from_pretrained("kms-engineer/assistant-bot-intent-classifier")
5model = AutoModelForSequenceClassification.from_pretrained("kms-engineer/assistant-bot-intent-classifier")
6
7# Create classification pipeline
8classifier = pipeline("text-classification", model=model, tokenizer=tokenizer)
9
10# Classify intent
11text = "add contact John Smith 212-555-0123 john@example.com"
12result = classifier(text)
13print(result)
14# Output: [{'label': 'add_contact', 'score': 0.98}]
15
16# More examples
17examples = [
18 "update phone for Sarah to 555-1234",
19 "show all my contacts",
20 "delete contact Bob",
21 "add note for Alice: Call back tomorrow"
22]
23
24for text in examples:
25 result = classifier(text)
26 print(f"{text} → {result[0]['label']} ({result[0]['score']:.2f})")Input: "add new contact John Doe 555-1234 john@email.com"
Output: add_contact (confidence: 0.99)
Input: "change email for Sarah to sarah@newmail.com"
Output: edit_email (confidence: 0.97)
Input: "show me all contacts"
Output: show_contacts (confidence: 0.98)
Input: "delete contact Bob"
Output: delete_contact (confidence: 0.96)
Input: "add tag 'work' to Alice"
Output: add_tag (confidence: 0.95)1@misc{kotenko2025intentclassifier,
2 author = {Kotenko, Mykyta},
3 title = {Intent Classifier for Contact Management Assistant Bot},
4 year = {2025},
5 publisher = {Hugging Face},
6 howpublished = {\url{https://huggingface.co/kms-engineer/assistant-bot-intent-classifier}},
7 note = {Based on RoBERTa by Facebook AI}
8}