Jupyter Notebook - demonstrate how to build the classification models.
Docker - run the application.
PyCharm - navigate the project, make API requests, and more.
If the repo has not already been installed, use the following commands to clone the repository and change to the directory.
git clone git@github.com:orlmlds/now-serving-text-classifications.git
cd now-serving-text-classifications/NowServing
cp .env.sample .env
This project requires python 3.6+. Confirm your python version by running:
python --version
Use the requirements file to download project dependencies.
pip install -r requirements.txt
Use the embeddings library to download the embeddings. NOTE: This command downloads a large file ~2GB and may take a while to complete. If the command does not begin a download, the file already exists.
python scripts/create_embeddings.py
Download the Consumer Complaint Database (589.4 MB) file from here. This will be used in the bag of words classifier.
python flaskr/app.py
POST /handle_complaint_request
| Field | Required | Description |
|---|---|---|
| narrative | yes | Complaint narrative |
curl -H "Content-Type: application/json" -X POST -d '{"narrative": "Dude my credit score sucks this is bullshit"}' http://0.0.0.0:3000/handle_complaint_requestPOST /handle_sentiment_request
| Field | Required | Description |
|---|---|---|
| txt | yes | text message |
curl -H "Content-Type: application/json" -X POST -d '{"txt": "this is terrible"}' http://0.0.0.0:3000/handle_sentiment_request