Update app.py
Browse files
app.py
CHANGED
@@ -61,26 +61,26 @@ def get_document_store():
|
|
61 |
document_store = get_document_store()
|
62 |
|
63 |
|
64 |
-
@st.cache(allow_output_mutation=True)
|
65 |
-
def get_retriever(document_store):
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
retriever = get_retriever(document_store)
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
|
85 |
prompt_template="Answer the given question using the following documents. \
|
86 |
Formulate your answer in the style of an academic report. \
|
|
|
61 |
document_store = get_document_store()
|
62 |
|
63 |
|
64 |
+
# @st.cache(allow_output_mutation=True)
|
65 |
+
# def get_retriever(document_store):
|
66 |
+
# retriever = EmbeddingRetriever(
|
67 |
+
# document_store=document_store,
|
68 |
+
# embedding_model="sentence-transformers/multi-qa-mpnet-base-dot-v1",
|
69 |
+
# model_format="sentence_transformers",
|
70 |
+
# progress_bar=False,
|
71 |
+
# )
|
72 |
+
# return retriever
|
73 |
+
|
74 |
+
# retriever = get_retriever(document_store)
|
75 |
+
|
76 |
+
|
77 |
+
Instantiate retriever
|
78 |
+
retriever = EmbeddingRetriever(
|
79 |
+
document_store=document_store,
|
80 |
+
embedding_model="sentence-transformers/multi-qa-mpnet-base-dot-v1",
|
81 |
+
model_format="sentence_transformers",
|
82 |
+
progress_bar=False,
|
83 |
+
)
|
84 |
|
85 |
prompt_template="Answer the given question using the following documents. \
|
86 |
Formulate your answer in the style of an academic report. \
|