How to use pytorch_model.bin to classify a single sentence?
Hi!

I fine-turned BERT on my own datasets by using run_glue.py. And I got pytorch_model.bin as output. I want to use pytorch_model.bin in another system to classify a single sentence from web browser. 
I would be grateful if you could teach me about usage.
Which task did you fine tune the model on? For single sentence it is probably Cola or SST-2  task right? 
You must use predict function by specifying do_predict in the input parameters.<|||||>Thank you for answering my question!
I fine-tuned my model on a original task for binary classifications of Japanese sentences. The processor for original task is below.

in transformers/data/processors/glue.py
```
class OriginalProcessor(DataProcessor):
    """Processor for the original data set."""
    def get_example_from_tensor_dict(self, tensor_dict):
        """See base class."""
        return InputExample(
            tensor_dict["idx"].numpy(),
            tensor_dict["sentence"].numpy().decode("utf-8"),
            None,
            str(tensor_dict["label"].numpy()),
        )

    def get_train_examples(self, data_dir):
        """See base class."""
        return self._create_examples(self._read_tsv(os.path.join(data_dir, "train.tsv")), "train")

    def get_dev_examples(self, data_dir):
        """See base class."""
        return self._create_examples(self._read_tsv(os.path.join(data_dir, "dev.tsv")), "dev")

    def get_labels(self):
        """See base class."""
        return ["0", "1"]

    def _create_examples(self, lines, set_type):
        """Creates examples for the training and dev sets."""
        examples = []
        for (i, line) in enumerate(lines):
            # if tsv files have a header, remove #
            # if i == 0:
            #     continue
            guid = "%s-%s" % (set_type, i)
            text_a = line[0]
            label = line[1]
            examples.append(InputExample(guid=guid, text_a=text_a, text_b=None, label=label))
        return examples
```

And please let me ask two questions.
1. Which is better to execute run_glue.py as an external process or to use my own script which mimic run_glue.py's predict function?
2. Can I load my fine-tuned model by specifying the directory which have 'pytorch_model.bin' in parameters or my script as written below? The directory includes output of fine-turning.

```
#parameter
--model_name_or_path="the path for the directory"

#script
model = BertForSequenceClassification.from_pretrained('the path for the directory')
```<|||||>I made it with first one. Thank you!<|||||>Both are doable. I would turn off training option and just use prediction option. 
Good to know you did it. 