mtyrrell commited on
Commit
cadc002
1 Parent(s): 3a2977e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +20 -20
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
- 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. \
 
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. \