Update app.py
Browse files
app.py
CHANGED
@@ -142,7 +142,7 @@ def bi_encode(bi_enc,passages):
|
|
142 |
|
143 |
return bi_encoder, corpus_embeddings
|
144 |
|
145 |
-
@st.experimental_singleton(
|
146 |
def cross_encode():
|
147 |
|
148 |
global cross_encoder
|
@@ -150,7 +150,7 @@ def cross_encode():
|
|
150 |
cross_encoder = CrossEncoder('cross-encoder/ms-marco-MiniLM-L-12-v2')
|
151 |
return cross_encoder
|
152 |
|
153 |
-
@st.experimental_memo(
|
154 |
def bm25_tokenizer(text):
|
155 |
|
156 |
# We also compare the results to lexical search (keyword search). Here, we use
|
@@ -164,7 +164,7 @@ def bm25_tokenizer(text):
|
|
164 |
tokenized_doc.append(token)
|
165 |
return tokenized_doc
|
166 |
|
167 |
-
@st.experimental_singleton(
|
168 |
def bm25_api(passages):
|
169 |
|
170 |
tokenized_corpus = []
|
|
|
142 |
|
143 |
return bi_encoder, corpus_embeddings
|
144 |
|
145 |
+
@st.experimental_singleton(suppress_st_warning=True)
|
146 |
def cross_encode():
|
147 |
|
148 |
global cross_encoder
|
|
|
150 |
cross_encoder = CrossEncoder('cross-encoder/ms-marco-MiniLM-L-12-v2')
|
151 |
return cross_encoder
|
152 |
|
153 |
+
@st.experimental_memo(suppress_st_warning=True)
|
154 |
def bm25_tokenizer(text):
|
155 |
|
156 |
# We also compare the results to lexical search (keyword search). Here, we use
|
|
|
164 |
tokenized_doc.append(token)
|
165 |
return tokenized_doc
|
166 |
|
167 |
+
@st.experimental_singleton(suppress_st_warning=True)
|
168 |
def bm25_api(passages):
|
169 |
|
170 |
tokenized_corpus = []
|