/sentiment-app

Demo project for serving a sentiment app with Flask

Primary LanguagePythonGNU General Public License v3.0GPL-3.0

Twitter Sentiment Web App

A simple web application to serve a machine learning model to predict sentiments of tweets. The master branch is the starting point of this project with the flask-app branch having a minimal working Flask application.

Data

The training data is a collection of tweets labeled as positive (1) or negative (0) sentiment. More about the data can be read here and it can be downloaded here.

Usage

To launch the application locally:

  • Create the .env file. You can use the .env.template as an example.
  • With GNU Make, run make all. That will take care of creating the virtual environment and trained machine learning model.
  • Without GNU Make, you'll need to use requirements.txt to create the virtual environment and run the app/model/model.py script to generate the serialized machine learning model. Finally, run flask run.

License

This project is distributed under the GNU General Public License. Please see COPYING for more information.