Text Data Model Explanations

Launch an movie sentiment prediction model and get explanations on text data.

In this demo we will:

  • Launch a movie sentiment model which takes text input
  • Send a request to get a sentiment predicton
  • Create an explainer for the model
  • Send the same request and then get an explanation for it

Create Model

Use the model url:

gs://seldon-models/sklearn/moviesentiment

load

Get Predictions

Run a single prediction using the JSON below.

{
  "data": {
    "names": [
      "Text review"
    ],
    "ndarray": [
      "this film has bad actors"
    ]
  }
}

load

Add an Anchor Text Explainer

Create an Anchor Text explainer using the default settings.

load

Get Explanation for one Request

Resend a single request using the JSON below and then explain it:

{
  "data": {
    "names": [
      "Text review"
    ],
    "ndarray": [
      "this film has bad actors"
    ]
  }
}

explain

Delete Deployment

Finally, delete the deployment.

explain



Last modified November 27, 2019: #79 Add missing JSON content to demo (c3cd37d)