Spaces:
Sleeping
Sleeping
update files
Browse files
app.py
CHANGED
|
@@ -29,7 +29,7 @@ def load_pdf_chunks(pdf_path):
|
|
| 29 |
|
| 30 |
@st.cache_resource
|
| 31 |
def load_model_and_index(chunks):
|
| 32 |
-
model = SentenceTransformer('
|
| 33 |
embeddings = model.encode(chunks)
|
| 34 |
faiss_index = faiss.IndexFlatL2(embeddings.shape[1])
|
| 35 |
faiss_index.add(np.array(embeddings))
|
|
|
|
| 29 |
|
| 30 |
@st.cache_resource
|
| 31 |
def load_model_and_index(chunks):
|
| 32 |
+
model = SentenceTransformer('models/all-MiniLM-L6-v2')
|
| 33 |
embeddings = model.encode(chunks)
|
| 34 |
faiss_index = faiss.IndexFlatL2(embeddings.shape[1])
|
| 35 |
faiss_index.add(np.array(embeddings))
|