output / src /classifier.py
jayanth-2005's picture
Update src/classifier.py
884071e verified
Raw History Blame Contribute Delete
263 Bytes
def classify_invoice(text):
text = text.lower()
if "credit note" in text:
return "CREDIT_NOTE"
if "tax invoice" in text and "gstin" in text:
return "GST_PURCHASE"
if "invoice" in text:
return "SALES"
return "UNKNOWN"