Spaces:
Sleeping
Sleeping
xavierbarbier
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -30,7 +30,7 @@ print("Start the model init process")
|
|
30 |
model = model = GPT4All(model_name, model_path, allow_download = False, device="cpu")
|
31 |
|
32 |
|
33 |
-
|
34 |
# creating a pdf reader object
|
35 |
reader = PdfReader("./resource/NGAP 01042024.pdf")
|
36 |
text = []
|
@@ -63,8 +63,8 @@ text_embeddings = np.array([get_text_embedding(chunk) for chunk in chunks])
|
|
63 |
d = text_embeddings.shape[1]
|
64 |
index = faiss.IndexFlatL2(d)
|
65 |
index.add(text_embeddings)
|
66 |
-
|
67 |
-
index = faiss.read_index("./resourse/embeddings_ngap.faiss")
|
68 |
|
69 |
print("Finish the model init process")
|
70 |
|
|
|
30 |
model = model = GPT4All(model_name, model_path, allow_download = False, device="cpu")
|
31 |
|
32 |
|
33 |
+
|
34 |
# creating a pdf reader object
|
35 |
reader = PdfReader("./resource/NGAP 01042024.pdf")
|
36 |
text = []
|
|
|
63 |
d = text_embeddings.shape[1]
|
64 |
index = faiss.IndexFlatL2(d)
|
65 |
index.add(text_embeddings)
|
66 |
+
|
67 |
+
#index = faiss.read_index("./resourse/embeddings_ngap.faiss")
|
68 |
|
69 |
print("Finish the model init process")
|
70 |
|