FAISS.load_local() not working when deploying streamlit app

Hi all,

I am trying to build an RAG chatbot with a persistent vector store that has already been pre-loaded onto my github repo.

However, it seems like the FAISS.load_local() is not able to read the vector store. I am wondering if load_local() is even able to load from a remote repo in the first place? If not, would you know of workarounds?

This is the error i’m encountering:

This is the relevant code:

    def load_vector_db(db : str = 'FAISS', persist_directory : str = None ):
        # create the open-source embedding function
        embedding_function = OpenAIEmbeddings(model='text-embedding-ada-002',
                                            show_progress_bar=True)
    
        new_db = FAISS.load_local(persist_directory, embedding_function)
        return new_db

    dbdirectory = f"https://raw.githubusercontent.com/{owner}/{repo}/main/faiss/"
    
    vectordb = load_vector_db('FAISS', dbdirectory)

    # Define retriever
    retriever = vectordb.as_retriever(search_type="mmr", search_kwargs={"k": 2, "fetch_k": 4})

The entire code for my app can be found here:

Thanks in advanec for the help!