Spaces:
Runtime error
Runtime error
from haystack.document_stores import InMemoryDocumentStore | |
from haystack.nodes import TfidfRetriever | |
from haystack.pipelines import ExtractiveQAPipeline | |
from haystack.nodes import FARMReader | |
import joblib | |
docs = joblib.load('docs.joblib') | |
document_store = InMemoryDocumentStore() | |
document_store.write_documents(docs) | |
retriever = TfidfRetriever(document_store) | |
reader = FARMReader(model_name_or_path="ixa-ehu/SciBERT-SQuAD-QuAC") | |
pipeline = ExtractiveQAPipeline(reader, retriever) | |