Skip to content

orlmlds/now-serving-text-classifications

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

now-serving-text-classifications

Recommended Software

Jupyter Notebook - demonstrate how to build the classification models.

Docker - run the application.

PyCharm - navigate the project, make API requests, and more.

Setup

Git

If the repo has not already been installed, use the following commands to clone the repository and change to the directory.

git clone [email protected]:orlmlds/now-serving-text-classifications.git
cd now-serving-text-classifications/NowServing
cp .env.sample .env

Python

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  

Downloads

Download the Consumer Complaint Database (589.4 MB) file from here. This will be used in the bag of words classifier.

Run

python flaskr/app.py

Request

Complaints

HTTP Request

POST /handle_complaint_request

Parameters

Field Required Description
narrative yes Complaint narrative

Sample Request Body for Complaint Predictions

    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_request

Sentiment

HTTP Request

POST /handle_sentiment_request

Parameters

Field Required Description
txt yes text message

Sample Request Body for Sentiment Predictions

    curl -H "Content-Type: application/json" -X POST -d '{"txt": "this is terrible"}' http://0.0.0.0:3000/handle_sentiment_request

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published