Last active
September 15, 2019 00:27
-
-
Save LetticiaNicoli/50554c8011d4803dfea24620330d2b84 to your computer and use it in GitHub Desktop.
Autokeras - Sentiment Analysis
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pip3 install autokeras.pretrained | |
from autokeras_pretrained.text_classifier import SentimentAnalysis | |
sentiment_cls = SentimentAnalysis() | |
polarity = sentiment_cls.predict("Today I forgot my wallet.") | |
print("Polarity of the input sentence is (sentiment is positive if polarity > 0.5) : ", polarity) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment