Tensor attribute not found in Tensorflow (docarray)

You use the docarray module in the chat lesson in this shortcourse (Langchain: chat with your llm). In turn, docarray seems to load tensorflow, and I get the error message that the Tensor attribute of tensorflow is not found. This error occurs in the statement:

            self.qa = load_db("temp.pdf", "stuff", 4)   ### <<<< ERROR

of the constructor of the cbfs class. More specifically, the error is somewhere inside:

    db = DocArrayInMemorySearch.from_documents(docs, embeddings)   # ERROR

inside the load_db() method. I am using python 3.10.x and module docarray 0.39.

It is hard for me to believe that nobody reported this error before. I am on a Mac M2 chip, but the error relates to tensorflow it seems, and not the fact I am on a mac. Any advice is appreciated!

I am also interested as to why docarray was used to construct an in-memory database. Couldn’ t this also be done with Streamlit?