SRK-CobuildX's picture
Release v0.1
d7c69c2 verified
Raw History Blame Contribute Delete
883 Bytes
# Copyright 2026 Cobuild Tech Private Limited
# SPDX-License-Identifier: Apache-2.0
"""Run from the model folder: python example.py (all messages below are invented)"""
from cbx_intent import IntentClassifier
clf = IntentClassifier(".")
messages = [
"My new card was posted ten days ago and it still hasn't shown up",
"Can I add money to my account using Google Pay?",
"I sent 200 euros to my sister on Monday and she says nothing has arrived",
"The cash machine at the station kept my card, what now?",
"Why was I charged a fee for taking cash out at an ATM?",
"I typed the wrong PIN too many times and now it's locked",
"There's a payment from a shop I've never been to on my statement",
"how old do u have to be to open an account",
]
for r in clf.classify(messages):
print(f"{r['text'][:60]:60s} -> {r['intent']} ({r['confidence']:.2f})")