Update functions.py
Browse files- functions.py +2 -4
functions.py
CHANGED
@@ -155,14 +155,12 @@ def gen_embeddings(embedding_model):
|
|
155 |
return embeddings
|
156 |
|
157 |
@st.experimental_memo(suppress_st_warning=True)
|
158 |
-
def embed_text(query,corpus,title,embedding_model,_emb_tok,chain_type):
|
159 |
|
160 |
'''Embed text and generate semantic search scores'''
|
161 |
|
162 |
title = title.split()[0].lower()
|
163 |
-
|
164 |
-
docsearch = process_corpus(corpus,_emb_tok,title, embedding_model)
|
165 |
-
|
166 |
docs = docsearch.similarity_search_with_score(query, k=3)
|
167 |
|
168 |
if chain_type == 'Normal':
|
|
|
155 |
return embeddings
|
156 |
|
157 |
@st.experimental_memo(suppress_st_warning=True)
|
158 |
+
def embed_text(query,corpus,title,embedding_model,_emb_tok,docsearch,chain_type):
|
159 |
|
160 |
'''Embed text and generate semantic search scores'''
|
161 |
|
162 |
title = title.split()[0].lower()
|
163 |
+
|
|
|
|
|
164 |
docs = docsearch.similarity_search_with_score(query, k=3)
|
165 |
|
166 |
if chain_type == 'Normal':
|