text-classification / model /sentiment.py
manudev-1's picture
cleaning sentiment.py
2297e70
raw
history blame contribute delete
255 Bytes
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)