JPLTedCas commited on
Commit
eac4b8a
·
verified ·
1 Parent(s): 6396813

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -6
app.py CHANGED
@@ -130,6 +130,8 @@ def get_vectorstore(text_chunks):
130
  """
131
  MODEL_NAME = "WhereIsAI/UAE-Large-V1"
132
  MODEL_NAME = "sentence-transformers/all-MiniLM-L6-v2"
 
 
133
  hf_embeddings = HuggingFaceEmbeddings(model_name=MODEL_NAME)
134
  vectorstore = Chroma.from_documents(text_chunks, hf_embeddings, persist_directory="db")
135
  return vectorstore
@@ -145,13 +147,12 @@ def get_conversation_chain(vectorstore:FAISS) -> ConversationalRetrievalChain:
145
  # #repo_id="TheBloke/Mixtral-8x7B-Instruct-v0.1-GGUF"
146
  # model_kwargs={"temperature": 0.5, "max_length": 2096},#1048
147
  #)
148
- #llm = HuggingFaceHub(
149
- # repo_id="mistralai/Mixtral-8x7B-Instruct-v0.1",
150
- # model_kwargs={"temperature": 0.5, "max_new_tokens": 1024, "max_length": 1048, "top_k": 3, "trust_remote_code": True, "torch_dtype": "auto"},
151
- #)
152
 
153
- llm = GPT4All("https://huggingface.co/TheBloke/Orca-2-13B-SFT_v5-GGUF/blob/main/orca-2-13b-sft_v5.Q6_K.gguf")
154
- # llm = ChatOpenAI(temperature=0, model="gpt-3.5-turbo-0613")
155
 
156
 
157
  memory = ConversationBufferMemory(memory_key="chat_history", return_messages=True)
 
130
  """
131
  MODEL_NAME = "WhereIsAI/UAE-Large-V1"
132
  MODEL_NAME = "sentence-transformers/all-MiniLM-L6-v2"
133
+ MODEL_NAME = "avsolatorio/GIST-Embedding-v0"
134
+
135
  hf_embeddings = HuggingFaceEmbeddings(model_name=MODEL_NAME)
136
  vectorstore = Chroma.from_documents(text_chunks, hf_embeddings, persist_directory="db")
137
  return vectorstore
 
147
  # #repo_id="TheBloke/Mixtral-8x7B-Instruct-v0.1-GGUF"
148
  # model_kwargs={"temperature": 0.5, "max_length": 2096},#1048
149
  #)
150
+ llm = HuggingFaceHub(
151
+ repo_id="mistralai/Mixtral-8x7B-Instruct-v0.1",
152
+ model_kwargs={"temperature": 0.5, "max_new_tokens": 1024, "max_length": 1048, "top_k": 3, "trust_remote_code": True, "torch_dtype": "auto"},
153
+ )
154
 
155
+
 
156
 
157
 
158
  memory = ConversationBufferMemory(memory_key="chat_history", return_messages=True)