Skip to content

Instantly share code, notes, and snippets.

@LetticiaNicoli
Last active September 15, 2019 00:27
Show Gist options
  • Select an option

  • Save LetticiaNicoli/50554c8011d4803dfea24620330d2b84 to your computer and use it in GitHub Desktop.

Select an option

Save LetticiaNicoli/50554c8011d4803dfea24620330d2b84 to your computer and use it in GitHub Desktop.

Revisions

  1. LetticiaNicoli revised this gist Sep 15, 2019. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion autokeras-SentimentAnalysis.py
    Original file line number Diff line number Diff line change
    @@ -2,5 +2,5 @@

    from autokeras_pretrained.text_classifier import SentimentAnalysis
    sentiment_cls = SentimentAnalysis()
    polarity = sentiment_cls.predict("Today i forgot my vallet")
    polarity = sentiment_cls.predict("Today I forgot my wallet.")
    print("Polarity of the input sentence is (sentiment is positive if polarity > 0.5) : ", polarity)
  2. LetticiaNicoli created this gist Sep 15, 2019.
    6 changes: 6 additions & 0 deletions autokeras-SentimentAnalysis.py
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,6 @@
    #pip3 install autokeras.pretrained

    from autokeras_pretrained.text_classifier import SentimentAnalysis
    sentiment_cls = SentimentAnalysis()
    polarity = sentiment_cls.predict("Today i forgot my vallet")
    print("Polarity of the input sentence is (sentiment is positive if polarity > 0.5) : ", polarity)