Spaces:
Sleeping
Sleeping
manue
Initialize environment variables for Hugging Face cache and remove use_cache from sentiment pipeline
8954f1d
| from transformers import pipeline, AutoModelForSequenceClassification, AutoTokenizer | |
| from typing import Any | |
| class Sentiment: | |
| def __init__(self, line: str) -> (list | list[Any] | Any | None): | |
| self.pipe = pipeline("text-classification", model="MilaNLProc/feel-it-italian-sentiment") | |
| self.result = self.pipe(line) | |