Skip to content

Commit

Permalink
Update predictor.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Santosh-Gupta committed May 29, 2019
1 parent f68e926 commit aa7bbfa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docproduct/predictor.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ def predict(self, questions, search_by='answer', topk=5, answer_only=False):
gpt2_input = self._get_gpt2_inputs(
questions[0], topk_question, topk_answer)
gpt2_pred = self.estimator.predict(
lambda: gpt2_estimator.predict_input_fn(inputs=gpt2_input, batch_size=self.batch_size))
lambda: gpt2_estimator.predict_input_fn(inputs=gpt2_input, batch_size=self.batch_size, checkpoint_path=gpt2_weight_file))
raw_output = gpt2_estimator.predictions_parsing(
gpt2_pred, self.encoder)
result_list = [re.search('`ANSWER:(.*)`QUESTION:', s)
Expand Down

0 comments on commit aa7bbfa

Please sign in to comment.