Additional Commit
Browse files- src/streamlit_app.py +3 -1
src/streamlit_app.py
CHANGED
|
@@ -75,6 +75,8 @@ def get_vectorestore(chunks,batch_size=512):
|
|
| 75 |
vectorestore.add_texts(batch)
|
| 76 |
vectorestore.save_local('Faiss.index')
|
| 77 |
|
|
|
|
|
|
|
| 78 |
#4. Prompting,Model,Chain
|
| 79 |
from langchain_core.prompts import PromptTemplate
|
| 80 |
# from langchain_google_genai import ChatGoogleGenerativeAI
|
|
@@ -193,7 +195,7 @@ def main():
|
|
| 193 |
with st.spinner('Processing study materials...'):
|
| 194 |
raw_text = get_pdf_text(study_pdfs)
|
| 195 |
chunks = get_chunks(raw_text)
|
| 196 |
-
get_vectorestore(chunks)
|
| 197 |
st.session_state.kb_ready = True
|
| 198 |
st.success('Knowledge base created.')
|
| 199 |
|
|
|
|
| 75 |
vectorestore.add_texts(batch)
|
| 76 |
vectorestore.save_local('Faiss.index')
|
| 77 |
|
| 78 |
+
return vectorestore
|
| 79 |
+
|
| 80 |
#4. Prompting,Model,Chain
|
| 81 |
from langchain_core.prompts import PromptTemplate
|
| 82 |
# from langchain_google_genai import ChatGoogleGenerativeAI
|
|
|
|
| 195 |
with st.spinner('Processing study materials...'):
|
| 196 |
raw_text = get_pdf_text(study_pdfs)
|
| 197 |
chunks = get_chunks(raw_text)
|
| 198 |
+
vectorstore = get_vectorestore(chunks)
|
| 199 |
st.session_state.kb_ready = True
|
| 200 |
st.success('Knowledge base created.')
|
| 201 |
|