1from transformers import AutoModelForSequenceClassification, AutoTokenizer, pipeline
2
3model_name = "CleitonOERocha/deepseek-r1-distill-llama-8B-finetuned-nfe-detection"
4
5model = AutoModelForSequenceClassification.from_pretrained(model_name, num_labels=2)
6tokenizer = AutoTokenizer.from_pretrained(model_name)
7
8clf = pipeline(
9 "text-classification",
10 model=model,
11 tokenizer=tokenizer,
12 top_k=None,
13 device="cuda" # "cpu" also works
14)
15
16print(clf("[CLS] Destinatario: XXX BATALHAO LOG [SEP] Municipio emitente: SÃO PAULO [SEP] Descricao do produto: MICROFONE LAPELA BY-M1 PRETO P2 [SEP] Qtd: 2 [SEP] Total: 649.78"))
17
1
2[{"label": "LABEL_1", "score": 0.9752885699272156}, {"label": "LABEL_0", "score": 0.024711500853300095}]
3
1@mastersthesis{rocha2025nfe,
2 author = {Cleiton Otavio da Exaltação Rocha and Gecynalda Soares da Silva Gomes},
3 title = {Detection of Potentially Untrustworthy Companies through Government Procurement Extracts},
4 school = {Universidade Federal da Bahia},
5 year = {2025},
6 address = {Salvador, Brasil}
7}