Skip to content

Instantly share code, notes, and snippets.

@dalequark
Created February 13, 2019 17:17
Show Gist options
  • Save dalequark/465dd949b6289546fc947a3f17ee7931 to your computer and use it in GitHub Desktop.
Save dalequark/465dd949b6289546fc947a3f17ee7931 to your computer and use it in GitHub Desktop.
InputExample
# Use the InputExample class from BERT's run_classifier code to create examples from the data
train_InputExamples = train.apply(lambda x: bert.run_classifier.InputExample(guid=None, # Globally unique ID for bookkeeping, unused in this example
text_a = x[DATA_COLUMN],
text_b = None,
label = x[LABEL_COLUMN]), axis = 1)
test_InputExamples = test.apply(lambda x: bert.run_classifier.InputExample(guid=None,
text_a = x[DATA_COLUMN],
text_b = None,
label = x[LABEL_COLUMN]), axis = 1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment