Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -64,7 +64,7 @@ bnb_config = BitsAndBytesConfig(
|
|
64 |
model = AutoModelForCausalLM.from_pretrained(
|
65 |
"mistralai/Mistral-7B-Instruct-v0.1",quantization_config=bnb_config,
|
66 |
)
|
67 |
-
new_db = FAISS.load_local("faiss_index",
|
68 |
# Connect query to FAISS index using a retriever
|
69 |
retriever = new_db.as_retriever(
|
70 |
search_type="mmr",
|
|
|
64 |
model = AutoModelForCausalLM.from_pretrained(
|
65 |
"mistralai/Mistral-7B-Instruct-v0.1",quantization_config=bnb_config,
|
66 |
)
|
67 |
+
new_db = FAISS.load_local("faiss_index", HuggingFaceEmbeddings(model_name='sentence-transformers/all-MiniLM-L12-v2'),allow_dangerous_deserialization=True)
|
68 |
# Connect query to FAISS index using a retriever
|
69 |
retriever = new_db.as_retriever(
|
70 |
search_type="mmr",
|