profile-pic
CoffeeMate
CoffeeMate is a browser-based deployment of a recurrent neural network using TensorflowJS. The model classifies free-text coffee preferences and descriptions into one of six roast classes.

Model


Describe your perfect cup of coffee. We'll classify your preferences into one of six roast classes to help you select the best bag of beans from your favorite coffee shop.




Caffeinate Me!

Very Dark


Bean Surface: Shiny
Agtron Numbers: 25-30
Dark French, Spanish Roasts
Burned or charred tones. Thin body.

Dark


Bean Surface: Very Shiny
Agtron Numbers: 30-35
Italian, Dark French Roasts
Bittersweet with burnt notes. No acidity.

Medium Dark


Bean Surface: Shiny
Agtron Numbers: 35-40
Espresso, French Roasts
No acidity. Standard American espresso.


Medium


Bean Surface: Dry, Slightly Oily
Agtron Numbers: 40-50
Vienna, Light French Roasts
Bittersweet.Standard Italian espresso.

Medium Light


Bean Surface: Dry
Agtron Numbers: 50-70
Medium, American Roasts
Fully developed flavor. Bright acidity.

Light


Bean Surface: Dry
Agtron Numbers: 70-80
Light, New England Roasts
Sour and grainy. Inexpensive blends.

About


CoffeeMate is an NLP classification project that aligns free-text coffee preferences with six categories of roast levels. The inference model was built and tested using Python 3, Tensorflow, Keras, and Google Colab.


Users provide a description of their favorite cup of coffee - this may include preferred flavors, strength, or origin. The neural network encodes this text into a set of high dimensional vectors that are passed into the model. The output layer is a 1D vector of categorical probabilities for 6 classes of coffee, light to dark!

Code



Data Collection and Scraping


Scraping and munging review data from CoffeeReview using BeautifulSoup.

View in Google Colab

Classification with BERT


Transfer Learning with BERT to create a model with ~90% validation accuracy.

View in Google Colab

Classification with Google's NNLM


Transfer Learning with Google's NNLM to test 128-dimensional embedding vectors.

View in Google Colab


Classification for the Browser


Transfer Learning with Universal Sentence Encoder to create a browser-fit model.

View in Google Colab

Deployment with TensorflowJS


Converting Keras model for use in Tensorflow.js using tfjs-converter.

View in Google Colab

Explore the Data


Explore the dataset to create,test, and refine your own model!

View in Google Colab