csalabs commited on
Commit
8c1e51d
·
1 Parent(s): 37cce00

Update app.py

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