[nltk_data] Downloading package stopwords to /home/roger/nltk_data...
[nltk_data]   Package stopwords is already up-to-date!

Flask Backend

Defines a factory for our app. Serving is packaged nicely inside a serve method, and is ready to deploy with waitress.

Factory method for our application. It returns an instance of our Flask application. Default configuration has the TFX serving predict API on http://localhost:8503/v1/models/alpha:predict

create_app[source]

create_app(test_config=None)

Returns a Flask web application with the default configuration pinging a TFX serving instance on http://localhost:8503/v1/models/alpha:predict

Using waitress, starts up a production server on the input host and port

serve[source]

serve(host, port)

Serves a waitress production server on the given host and post

# The following are test cases for deployment