Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -3,13 +3,12 @@ import pandas as pd
|
|
3 |
|
4 |
from haystack.schema import Answer
|
5 |
from haystack.document_stores import InMemoryDocumentStore
|
6 |
-
from haystack.
|
7 |
from haystack.retriever.dense import EmbeddingRetriever
|
8 |
from haystack.utils import print_answers
|
9 |
import logging
|
10 |
|
11 |
-
#Haystack function calls
|
12 |
-
@st.cache(hash_funcs={"builtins.SwigPyObject": lambda _: None},allow_output_mutation=True) # use streamlit cache
|
13 |
|
14 |
def start_haystack():
|
15 |
document_store = InMemoryDocumentStore(index="document", embedding_field='embedding', embedding_dim=384, similarity='cosine')
|
|
|
3 |
|
4 |
from haystack.schema import Answer
|
5 |
from haystack.document_stores import InMemoryDocumentStore
|
6 |
+
from haystack.pipelines import FAQPipeline
|
7 |
from haystack.retriever.dense import EmbeddingRetriever
|
8 |
from haystack.utils import print_answers
|
9 |
import logging
|
10 |
|
11 |
+
#Haystack function calls
|
|
|
12 |
|
13 |
def start_haystack():
|
14 |
document_store = InMemoryDocumentStore(index="document", embedding_field='embedding', embedding_dim=384, similarity='cosine')
|