Update functions.py
Browse files- functions.py +2 -4
functions.py
CHANGED
@@ -122,7 +122,7 @@ def load_asr_model(asr_model_name):
|
|
122 |
return asr_model
|
123 |
|
124 |
@st.experimental_singleton(suppress_st_warning=True)
|
125 |
-
def process_corpus(corpus, _tok, title,
|
126 |
|
127 |
'''Process text for Semantic Search'''
|
128 |
|
@@ -135,7 +135,7 @@ def process_corpus(corpus, _tok, title, embeddings, chunk_size=200, overlap=50):
|
|
135 |
|
136 |
docsearch = Pinecone.from_texts(
|
137 |
texts,
|
138 |
-
|
139 |
index_name = index_id,
|
140 |
namespace = f'{title}-earnings',
|
141 |
metadatas = [
|
@@ -168,8 +168,6 @@ def embed_text(query,corpus,title,embedding_model,_emb_tok,chain_type='stuff'):
|
|
168 |
|
169 |
index_id = "earnings-embeddings"
|
170 |
|
171 |
-
|
172 |
-
|
173 |
embeddings = gen_embeddings(embedding_model)
|
174 |
|
175 |
title = title[0]
|
|
|
122 |
return asr_model
|
123 |
|
124 |
@st.experimental_singleton(suppress_st_warning=True)
|
125 |
+
def process_corpus(corpus, _tok, title, _embeddings, chunk_size=200, overlap=50):
|
126 |
|
127 |
'''Process text for Semantic Search'''
|
128 |
|
|
|
135 |
|
136 |
docsearch = Pinecone.from_texts(
|
137 |
texts,
|
138 |
+
_embeddings,
|
139 |
index_name = index_id,
|
140 |
namespace = f'{title}-earnings',
|
141 |
metadatas = [
|
|
|
168 |
|
169 |
index_id = "earnings-embeddings"
|
170 |
|
|
|
|
|
171 |
embeddings = gen_embeddings(embedding_model)
|
172 |
|
173 |
title = title[0]
|