File size: 276 Bytes
1dc8930
7106645
 
 
 
03c041a
7106645
 
1
2
3
4
5
6
7
8
from transformers import pipeline
from typing import Any

class Sentiment:
    def __init__(self, line: str) -> (list | list[Any] | Any | None):
        self.pipe = pipeline("text-classification", model='./feel-it-italian-sentiment')
        self.result = self.pipe(line)