Skip to content

Deep learning model trained on IMDB dataset to predict sentence sentiment, with around 89% accuracy. Ready for deployment on Heroku with Flask.

License

Notifications You must be signed in to change notification settings

KMoszczyc/Sentiment-Predictor-CNN

Repository files navigation

Sentiment Predictor

About

Deep learning model trained on IMDB dataset to predict sentence sentiment with around 89% accuracy. The model was also trained on a list of popular positive and negative words becouse many of those are missing from IMDB dataset (duh). Ready for deployment on Heroku with Flask.

Usage

Local setup

or just use my deployed model on Heroku

Examples

(prediction 0 - negative sentence, 1 - positive sentence)

{
    "text": ["The acting is terrible, plot is boring and predictable. What a waste of time.."]
}

response: [{"prediction":0.0,"probability":0.995847702}]  

 {
    "text": ["Great acting, amazing cast. Movie is not trivial and not for an average viewer. Pushes to think and ponder on the meaning of life."]
}

response: [{"prediction":1.0,"probability":0.9719628692}]


{
    "text": ["The pancakes were out of this world, I've never eaten something so tasty in my life"]
}

response: [{"prediction":1.0,"probability":0.9649505019}]  

{
    "text": ["Staff doesn't care about the customer, had to wait for 30 minutes till somebody showed up. Huge disappointment."]
}

response: [{"prediction":0.0,"probability":0.8519150615}] 

Or you can send multiple text samples

{ 
    "text": ["The acting is terrible, plot is boring and predictable. 
                What a waste of time..", 
                "A very nice movie", "I like drinking beer at the sunset."] 
} 

response: [{"prediction":0.0,"probability":0.995847702},
            {"prediction":1.0,"probability":0.8738321066},
            {"prediction":1.0,"probability":0.9644991755}]

Model

Screenshot

About

Deep learning model trained on IMDB dataset to predict sentence sentiment, with around 89% accuracy. Ready for deployment on Heroku with Flask.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published