import streamlit as st from dotenv import load_dotenv from PyPDF2 import PdfReader from langchain import embeddings from langchain.text_splitter import CharacterTextSplitter from langchain.embeddings import OpenAIEmbeddings, HuggingFaceInstructEmbeddings from langchain.vectorstores import FAISS from langchain.vectorstores import faiss from langchain.chat_models import ChatOpenAI from langchain.memory import ConversationBufferMemory from langchain.chains import ConversationalRetrievalChain import os import pickle from datetime import datetime css = '''