Shreyas commited on
Commit
84d2f53
1 Parent(s): 4447d48

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",model_kwargs={"trust_remote_code":True,"revision":"289f532e14dbbbd5a04753fa58739e9ba766f3c7"})
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})
@@ -65,7 +65,7 @@ ANSWER:
65
  prompt = PromptTemplate(template=prompt_template,
66
  input_variables=['context', 'question', 'chat_history'])
67
 
68
- # You can also use other LLMs options from https://python.langchain.com/docs/integrations/llms. Here I have used TogetherAI API
69
  os.environ["TOGETHER_API_KEY"] = "ce91a607b153fc2fa7a63f6081686beee67b30a6ff2a7e8e8d07d522b361bc55"
70
  TOGETHER_AI_API = "ce91a607b153fc2fa7a63f6081686beee67b30a6ff2a7e8e8d07d522b361bc55"
71
  llm = Together(
 
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,"revision":"289f532e14dbbbd5a04753fa58739e9ba766f3c7"})
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})
 
65
  prompt = PromptTemplate(template=prompt_template,
66
  input_variables=['context', 'question', 'chat_history'])
67
 
68
+
69
  os.environ["TOGETHER_API_KEY"] = "ce91a607b153fc2fa7a63f6081686beee67b30a6ff2a7e8e8d07d522b361bc55"
70
  TOGETHER_AI_API = "ce91a607b153fc2fa7a63f6081686beee67b30a6ff2a7e8e8d07d522b361bc55"
71
  llm = Together(