Skip to content

Instantly share code, notes, and snippets.

@analyticsindiamagazine
Created November 27, 2019 06:28
Show Gist options
  • Save analyticsindiamagazine/787c2fb56b5f3e880a73383a9b6efc7f to your computer and use it in GitHub Desktop.
Save analyticsindiamagazine/787c2fb56b5f3e880a73383a9b6efc7f to your computer and use it in GitHub Desktop.
# Importing The WIT essentials
from witwidget.notebook.visualization import WitConfigBuilder
from witwidget.notebook.visualization import WitWidget
#Setting the WIT tool box height in pixels
tool_height_in_px = 600
# Configuring the WIT tool with the test examples and the trained classifier
config_builder = WitConfigBuilder(test_examples[0:num_datapoints]).set_estimator_and_feature_spec(
classifier, feature_spec).set_compare_estimator_and_feature_spec(
classifier2, feature_spec).set_label_vocab(list(enc_labels))
# Invoking the WIT tool
a = WitWidget(config_builder, height=tool_height_in_px)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment