CoolFace
Modelpublic

admesh/agentic-intent-classifier

sourceHugging Faceapache-2.0updated 6mo agoView on Hugging Face
2likes51downloads
inference_iab_classifier.py23 linesDownload Raw Back to root
1import json2 3try:4    from .iab_classifier import predict_iab_content_classifier  # type: ignore5except ImportError:6    from iab_classifier import predict_iab_content_classifier7 8 9def predict(text: str, confidence_threshold: float | None = None):10    return predict_iab_content_classifier(text, confidence_threshold=confidence_threshold)11 12 13examples = [14    "Which laptop should I buy for college?",15    "What is CRM software?",16    "Book a table for two tonight",17]18 19if __name__ == "__main__":20    for text in examples:21        print(f"\nInput: {text}")22        print("Prediction:", json.dumps(predict(text), indent=2))23