Gosula commited on
Commit
07ad22b
·
1 Parent(s): a75113a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -35,14 +35,14 @@ def get_text_chunks(text):
35
  def get_vectorstore(text_chunks):
36
  embeddings = OpenAIEmbeddings()
37
 
38
- embeddings = HuggingFaceInstructEmbeddings(model_name="hkunlp/instructor-xl")
39
  vectorstore = FAISS.from_texts(texts=text_chunks, embedding=embeddings)
40
  return vectorstore
41
 
42
 
43
  def get_conversation_chain(vectorstore):
44
- llm = ChatOpenAI()
45
- #llm = HuggingFaceHub(repo_id="google/flan-t5-xxl", model_kwargs={"temperature":0.5, "max_length":512})
46
 
47
  memory = ConversationBufferMemory(
48
  memory_key='chat_history', return_messages=True)
 
35
  def get_vectorstore(text_chunks):
36
  embeddings = OpenAIEmbeddings()
37
 
38
+ #embeddings = HuggingFaceInstructEmbeddings(model_name="hkunlp/instructor-xl")
39
  vectorstore = FAISS.from_texts(texts=text_chunks, embedding=embeddings)
40
  return vectorstore
41
 
42
 
43
  def get_conversation_chain(vectorstore):
44
+ #llm = ChatOpenAI()
45
+ llm = HuggingFaceHub(repo_id="google/flan-t5-xxl", model_kwargs={"temperature":0.5, "max_length":512})
46
 
47
  memory = ConversationBufferMemory(
48
  memory_key='chat_history', return_messages=True)