ClearSpend / model_setup.py
MonilM's picture
Improved NLP Logic
07b50c0
raw
history blame contribute delete
227 Bytes
from transformers import pipeline
# Load once and reuse
zero_shot = pipeline("zero-shot-classification", model="joeddav/xlm-roberta-large-xnli")
ner = pipeline("ner", model="dslim/bert-base-NER", aggregation_strategy="simple")