from langchain_community.document_loaders import DirectoryLoader from langchain_community.document_loaders import PyPDFLoader from langchain.text_splitter import RecursiveCharacterTextSplitter from langchain.text_splitter import CharacterTextSplitter from langchain_community.vectorstores import FAISS from langchain_community.embeddings.huggingface import HuggingFaceEmbeddings from langchain.chains import ConversationChain from langchain.memory import ConversationBufferMemory from langchain.chains import ( StuffDocumentsChain, LLMChain, ConversationalRetrievalChain ) from langchain_core.prompts import PromptTemplate import streamlit as st from PyPDF2 import PdfReader css = '''