Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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 |
-
|
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}
|