mery22 commited on
Commit
100db0c
1 Parent(s): 663e8a7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -33,8 +33,7 @@ from transformers import AutoTokenizer, AutoModelForCausalLM
33
  tokenizer = AutoTokenizer.from_pretrained("mistralai/Mistral-7B-Instruct-v0.3")
34
  model = AutoModelForCausalLM.from_pretrained("mistralai/Mistral-7B-Instruct-v0.3")
35
 
36
- load_dataset("pandas", data_files="index.pkl")
37
- # Connect query to FAISS index using a retriever
38
  retriever = db.as_retriever(
39
  search_type="mmr",
40
  search_kwargs={'k': 1}
 
33
  tokenizer = AutoTokenizer.from_pretrained("mistralai/Mistral-7B-Instruct-v0.3")
34
  model = AutoModelForCausalLM.from_pretrained("mistralai/Mistral-7B-Instruct-v0.3")
35
 
36
+ ectorstore=FAISS.load_local(folder_path="index.faiss", embeddings=HuggingFaceEmbeddings(model_name='sentence-transformers/all-MiniLM-L12-v2'), allow_dangerous_deserialization=True)# Connect query to FAISS index using a retriever
 
37
  retriever = db.as_retriever(
38
  search_type="mmr",
39
  search_kwargs={'k': 1}