Spaces:
Sleeping
Sleeping
Download nlp.py from Idhammz/Sentiment-Analysis: direct link, hf CLI and curl.
- Browser
- Download file 202 Bytes
-
https://huggingface.co/spaces/Idhammz/Sentiment-Analysis/resolve/main/nlp.py
- Command line
-
hf download hf://spaces/Idhammz/Sentiment-Analysis/nlp.py
-
curl -L -o nlp.py https://huggingface.co/spaces/Idhammz/Sentiment-Analysis/resolve/main/nlp.py
202 Bytes
| # nlp.py | |
| from classifier import Classifier | |
| classifier = Classifier() | |
| def sentiment_analysis(self, text:str, classifier: | |
| sentiment = classifier.get_sentiment_label_and_score(text) | |
| return sentiment |