peter2000 commited on
Commit
808297d
1 Parent(s): 576942c

Update appStore/keyword_search.py

Browse files
Files changed (1) hide show
  1. appStore/keyword_search.py +2 -2
appStore/keyword_search.py CHANGED
@@ -15,7 +15,7 @@ import pandas as pd
15
  from sklearn.feature_extraction import _stop_words
16
  from haystack.document_stores import InMemoryDocumentStore
17
  from haystack.pipelines import ExtractiveQAPipeline
18
- from haystack.nodes import FARMReader, TfidfRetriever; EmbeddingRetriever
19
  import string
20
  from markdown import markdown
21
  from annotated_text import annotation
@@ -38,7 +38,7 @@ def start_haystack(documents_processed):
38
  model_format="sentence_transformers")
39
  document_store.update_embeddings(retriever)
40
 
41
- retriever = EmbeddingRetriever(document_store=document_store)
42
  reader = FARMReader(model_name_or_path="deepset/tinyroberta-squad2", use_gpu=True) #deepset/roberta-base-squad2
43
  pipeline = ExtractiveQAPipeline(reader, retriever)
44
  return pipeline
 
15
  from sklearn.feature_extraction import _stop_words
16
  from haystack.document_stores import InMemoryDocumentStore
17
  from haystack.pipelines import ExtractiveQAPipeline
18
+ from haystack.nodes import FARMReader, TfidfRetriever, EmbeddingRetriever
19
  import string
20
  from markdown import markdown
21
  from annotated_text import annotation
 
38
  model_format="sentence_transformers")
39
  document_store.update_embeddings(retriever)
40
 
41
+
42
  reader = FARMReader(model_name_or_path="deepset/tinyroberta-squad2", use_gpu=True) #deepset/roberta-base-squad2
43
  pipeline = ExtractiveQAPipeline(reader, retriever)
44
  return pipeline