File size: 291 Bytes
35d761c
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
from transformers import pipeline

try:
    print("Loading pipeline...")
    classifier = pipeline("text-classification", model="finmigodeveloper/distilbert-transaction-classifier-lora")
    res = classifier("Starbucks coffee")
    print(res)
except Exception as e:
    print(f"Error: {e}")