File size: 255 Bytes
7e8513d
7106645
 
2297e70
7e8513d
8954f1d
7106645
 
1
2
3
4
5
6
7
8
from transformers import pipeline

class Sentiment:
    def __init__(self, line: str):
        # self = this in C#
        self.pipe = pipeline("text-classification", model="MilaNLProc/feel-it-italian-sentiment")
        self.result = self.pipe(line)