def get_prediction(self, doc_tokens, query_tokens, pos_to_sp_fact):
    """Run BERT to get answer prediction."""
    tf.logging.info("Features for answer BERT")
    current_features, current_toks, doc_start = self.get_features(
        doc_tokens, query_tokens, pos_to_sp_fact, 0)
    tf.logging.info("Running answer BERT")
    result = self._run_on_features([current_features])
    tf.logging.info("Mapping positions to supporting facts")
    token_to_sp_fact_map = {}
    for pos, sp in pos_to_sp_fact.items():
      token_to_sp_fact_map[doc_start + pos] = sp
    tf.logging.info("Postprocess answer.")
    answer, sp_facts = self.postprocess(
        current_toks, token_to_sp_fact_map,
        result[0], 20, FLAGS.max_answer_length)
    return answer, sp_facts
Run BERT to get answer prediction.
language/labs/drkit/hotpotqa/demo.py