tony346 commited on
Commit
e19856d
·
1 Parent(s): 6d6fc30

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -43,10 +43,11 @@ def get_text_chunks(text):
43
 
44
  def get_vectorstore(text_chunks):
45
  # Load the desired embeddings model.
46
- embeddings = HuggingFaceEmbeddings(model_name='sentence-transformers/all-MiniLM-L6-v2',
47
- model_kwargs={'device': 'cpu'})
48
  # embeddings = OpenAIEmbeddings()sentence-transformers/all-MiniLM-L6-v2
49
- # embeddings = HuggingFaceInstructEmbeddings(model_name="hkunlp/instructor-xl")
 
50
  # vectorstore = FAISS.from_texts(texts=text_chunks, embedding=embeddings)
51
  vectorstore = Chroma.from_texts(texts=text_chunks, embedding=embeddings)
52
 
 
43
 
44
  def get_vectorstore(text_chunks):
45
  # Load the desired embeddings model.
46
+ # embeddings = HuggingFaceEmbeddings(model_name='sentence-transformers/all-MiniLM-L6-v2',
47
+ # model_kwargs={'device': 'cpu'})
48
  # embeddings = OpenAIEmbeddings()sentence-transformers/all-MiniLM-L6-v2
49
+ embeddings = HuggingFaceInstructEmbeddings(model_name="hkunlp/instructor-xl",
50
+ model_kwargs={'device':'cpu'})
51
  # vectorstore = FAISS.from_texts(texts=text_chunks, embedding=embeddings)
52
  vectorstore = Chroma.from_texts(texts=text_chunks, embedding=embeddings)
53