Spaces:
Runtime error
Runtime error
Download src/classifier.py from jayanth-2005/output: direct link, hf CLI and curl.
- Browser
- Download file 263 Bytes
-
https://huggingface.co/spaces/jayanth-2005/output/resolve/main/src/classifier.py
- Command line
-
hf download hf://spaces/jayanth-2005/output/src/classifier.py
-
curl -L -o classifier.py https://huggingface.co/spaces/jayanth-2005/output/resolve/main/src/classifier.py
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" | |