An example of running sentiment analysis on a slack channel.
This project required Python. Ideally 3.9 or above.
Packages are managed with pipenv.
pipenv sync --dev
pipenv run notebook
Assuming you have created a model by running through the notebook, these instructions will show you how to take that model and expose it as a web service deployed using a docker image.
docker build -t slack-sentiment .
docker run -it --rm -p 5000:5000 slack-sentiment
If you want to leave the container running in the background instead use:
docker run -d -p 5000:5000 slack-sentiment
$ curl -d "text='Hello! Have a wonderful day.'" -X POST http://localhost:5000/
That text appears to be positive :)
$ curl -d "text='Boo. This sucks!'" -X POST http://localhost:5000/
That text appears to be negative :(