ai-bookkeeper-backend / test_classifier2.py
Pushkar Pandey
fix: move backend files to root for HuggingFace
61ec498
Raw
History Blame Contribute Delete
302 Bytes
from transformers import pipeline
try:
print("Loading jonjimenez/transaction-categorization...")
classifier = pipeline("text-classification", model="jonjimenez/transaction-categorization")
res = classifier("Starbucks coffee")
print(res)
except Exception as e:
print(f"Error: {e}")