From 747f402544e19678ad5af7dd44df794142df6e3f Mon Sep 17 00:00:00 2001 From: Tanay Soni Date: Mon, 27 Apr 2020 21:57:42 +0200 Subject: [PATCH] Add docstring --- haystack/finder.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/haystack/finder.py b/haystack/finder.py index 07bbc193d..0c73e8ca2 100644 --- a/haystack/finder.py +++ b/haystack/finder.py @@ -1,8 +1,7 @@ import logging -from scipy.special import expit -import numpy as np -from haystack.database.base import Document +import numpy as np +from scipy.special import expit logger = logging.getLogger(__name__) @@ -38,6 +37,7 @@ class Finder: results = {"question": question, "answers": []} return results + # 2) Apply reader to get granular answer(s) len_chars = sum([len(d.text) for d in documents]) logger.info(f"Reader is looking for detailed answer in {len_chars} chars ...") results = self.reader.predict(question=question,