Commit bd8f91ae by zaid

final commints

parent 4673e4d0
...@@ -25,7 +25,7 @@ def main(): ...@@ -25,7 +25,7 @@ def main():
st.session_state.answer = [] st.session_state.answer = []
st.header("Chat with your Indexed PDFs") st.header("Chat with multiple PDFs :books:")
resonse_container, container = st.container(), st.container() resonse_container, container = st.container(), st.container()
with container: with container:
...@@ -41,7 +41,7 @@ def main(): ...@@ -41,7 +41,7 @@ def main():
os.environ['OPENAI_API_KEY'] = OPENAI_API_KEY os.environ['OPENAI_API_KEY'] = OPENAI_API_KEY
st.subheader("Your documents") st.subheader("Your documents")
pdf_docs = st.file_uploader( pdf_docs = st.file_uploader(
"Upload your PDFs here and click on 'Process'", accept_multiple_files=True, type=['pdf']) "Upload your PDFs here and click on 'Process'", accept_multiple_files=True)
if st.button("Process"): if st.button("Process"):
with st.spinner("Processing"): with st.spinner("Processing"):
# get pdf text # get pdf text
...@@ -91,7 +91,6 @@ def get_vectorstore(text_chunks): ...@@ -91,7 +91,6 @@ def get_vectorstore(text_chunks):
vectorstore = FAISS.from_texts(texts=text_chunks, embedding=embeddings) vectorstore = FAISS.from_texts(texts=text_chunks, embedding=embeddings)
return vectorstore return vectorstore
def get_conversation_chain(vectorstore): def get_conversation_chain(vectorstore):
llm = ChatOpenAI() llm = ChatOpenAI()
memory = ConversationBufferMemory( memory = ConversationBufferMemory(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment