alejandro-ao / ask-multiple-pdfs

A Langchain app that allows you to chat with multiple PDFs
1.6k stars 913 forks source link

ValueError: Dependencies for InstructorEmbedding not found. #44

Open Rockyou1 opened 9 months ago

Rockyou1 commented 9 months ago

I got this strange issue when I tried to use the Constructor version of the app, even though I had it installed a few different ways on the system it took 8 hours as I trying to find the cause but there is nothing about such a problem anywhere

costabm commented 8 months ago

I get this error too, when I use HuggingFace: embeddings = HuggingFaceInstructEmbeddings(model_name="hkunlp/instructor-xl") llm = HuggingFaceHub(repo_id="google/flan-t5-xxl", model_kwargs={"temperature":0.5, "max_length":512})

But everything is fine when using OpenAI: embeddings = OpenAIEmbeddings() llm = ChatOpenAI()

costabm commented 8 months ago

Solution for me:

pip install InstructorEmbedding sentence_transformers huggingface-hub

(explained here https://youtu.be/dXxQ0LR-3Hg?si=hhCtkHBvJsu6VO1V&t=2258) (you can also just go to the requirements.txt and uncomment the respective packages)

E2-Sean commented 8 months ago

I had same issue. pip install sentence_transformers fixed it as described by costabm.

alpynepyano commented 7 months ago

same issue, same solution - thank you @E2-Sean , @Rockyou1, @costabm !

For the moment an other issue: when the docu is up-loaded and the process-button is clicked then it processes and processes and does not want come to an end (online connected) - what might I check ? (I have a GPU but I am not shure wether it is used with this code)

StrauchiigaisG commented 5 months ago

I had a similar issue described above - Dependencies for InstructorEmbedding not found The problem was with torch module. The installation of sentence_transformers did not complete - saying killed Solution was to pip install torch --no-cache-dir and then reinstalling senttence_transformers