Shreyas commited on
Commit
7ad9be3
1 Parent(s): f1a5fc8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -49,7 +49,7 @@ if "messages" not in st.session_state:
49
  if "memory" not in st.session_state:
50
  st.session_state.memory = ConversationBufferWindowMemory(k=2, memory_key="chat_history",return_messages=True)
51
 
52
- embeddings = HuggingFaceEmbeddings(model_name="nomic-ai/nomic-embed-text-v1.5",model_kwargs={"trust_remote_code":True})
53
  db = FAISS.load_local("ipc_vector_db", embeddings, allow_dangerous_deserialization=True)
54
 
55
  db_retriever = db.as_retriever(search_type="similarity",search_kwargs={"k": 4})
@@ -69,7 +69,7 @@ prompt = PromptTemplate(template=prompt_template,
69
  os.environ["TOGETHER_API_KEY"] = "ce91a607b153fc2fa7a63f6081686beee67b30a6ff2a7e8e8d07d522b361bc55"
70
  TOGETHER_AI_API = "ce91a607b153fc2fa7a63f6081686beee67b30a6ff2a7e8e8d07d522b361bc55"
71
  llm = Together(
72
- model="mistralai/Mistral-7B-Instruct-v0.2",
73
  temperature=0.5,
74
  max_tokens=1024,
75
  together_api_key=TOGETHER_AI_API
 
49
  if "memory" not in st.session_state:
50
  st.session_state.memory = ConversationBufferWindowMemory(k=2, memory_key="chat_history",return_messages=True)
51
 
52
+ embeddings = HuggingFaceEmbeddings(model_name="nomic-ai/nomic-embed-text-v1",model_kwargs={"trust_remote_code":True})
53
  db = FAISS.load_local("ipc_vector_db", embeddings, allow_dangerous_deserialization=True)
54
 
55
  db_retriever = db.as_retriever(search_type="similarity",search_kwargs={"k": 4})
 
69
  os.environ["TOGETHER_API_KEY"] = "ce91a607b153fc2fa7a63f6081686beee67b30a6ff2a7e8e8d07d522b361bc55"
70
  TOGETHER_AI_API = "ce91a607b153fc2fa7a63f6081686beee67b30a6ff2a7e8e8d07d522b361bc55"
71
  llm = Together(
72
+ model="mistralai/Mistral-7B-Instruct-v0.3",
73
  temperature=0.5,
74
  max_tokens=1024,
75
  together_api_key=TOGETHER_AI_API