Update pages/3_Earnings_Semantic_Search_π_.py
Browse files
pages/3_Earnings_Semantic_Search_π_.py
CHANGED
@@ -48,14 +48,16 @@ try:
|
|
48 |
sen_df = st.session_state['sen_df']
|
49 |
|
50 |
title = st.session_state['title']
|
|
|
|
|
51 |
|
52 |
with st.spinner(
|
53 |
-
text=f"Loading {
|
54 |
):
|
55 |
|
56 |
-
docsearch = process_corpus(st.session_state['earnings_passages'],
|
57 |
|
58 |
-
result = embed_text(search_input,title,
|
59 |
|
60 |
|
61 |
references = [doc.page_content for doc in result['input_documents']]
|
|
|
48 |
sen_df = st.session_state['sen_df']
|
49 |
|
50 |
title = st.session_state['title']
|
51 |
+
|
52 |
+
embedding_model = bi_enc_dict[sbert_model_name]
|
53 |
|
54 |
with st.spinner(
|
55 |
+
text=f"Loading {embedding_model} embedding model and Generating Response..."
|
56 |
):
|
57 |
|
58 |
+
docsearch = process_corpus(st.session_state['earnings_passages'],emb_tokenizer,title, embedding_model)
|
59 |
|
60 |
+
result = embed_text(search_input,title,embedding_model,emb_tokenizer,docsearch,chain_type)
|
61 |
|
62 |
|
63 |
references = [doc.page_content for doc in result['input_documents']]
|