Spaces:
Runtime error
Runtime error
Update appStore/keyword_search.py
Browse files
appStore/keyword_search.py
CHANGED
|
@@ -18,6 +18,7 @@ from haystack.pipelines import ExtractiveQAPipeline
|
|
| 18 |
from haystack.nodes import FARMReader, TfidfRetriever
|
| 19 |
import string
|
| 20 |
from markdown import markdown
|
|
|
|
| 21 |
from tqdm.autonotebook import tqdm
|
| 22 |
import numpy as np
|
| 23 |
import tempfile
|
|
@@ -108,7 +109,7 @@ def app():
|
|
| 108 |
logging.info(msg)
|
| 109 |
results = ask_question(question,pipeline)
|
| 110 |
st.write('## Top Results')
|
| 111 |
-
st.write(results)
|
| 112 |
for count, result in enumerate(results):
|
| 113 |
if result["answer"]:
|
| 114 |
answer, context = result["answer"], result["context"]
|
|
|
|
| 18 |
from haystack.nodes import FARMReader, TfidfRetriever
|
| 19 |
import string
|
| 20 |
from markdown import markdown
|
| 21 |
+
from annotated_text import annotation
|
| 22 |
from tqdm.autonotebook import tqdm
|
| 23 |
import numpy as np
|
| 24 |
import tempfile
|
|
|
|
| 109 |
logging.info(msg)
|
| 110 |
results = ask_question(question,pipeline)
|
| 111 |
st.write('## Top Results')
|
| 112 |
+
#st.write(results)
|
| 113 |
for count, result in enumerate(results):
|
| 114 |
if result["answer"]:
|
| 115 |
answer, context = result["answer"], result["context"]
|