Spaces:
Sleeping
Sleeping
Mr-Vicky-01
commited on
Commit
•
cbacd5d
1
Parent(s):
25af079
Update app.py
Browse files
app.py
CHANGED
@@ -27,7 +27,8 @@ def get_text_chunks(text):
|
|
27 |
return chunks
|
28 |
|
29 |
def get_vector_store(text_chunks):
|
30 |
-
|
|
|
31 |
vector_store = FAISS.from_texts(text_chunks, embedding=embeddings)
|
32 |
vector_store.save_local("faiss_index")
|
33 |
|
|
|
27 |
return chunks
|
28 |
|
29 |
def get_vector_store(text_chunks):
|
30 |
+
HF_TOKEN = os.getenv("HF_TOKEN")
|
31 |
+
embeddings = HuggingFaceInferenceAPIEmbeddings(api_key=HF_TOKEN, model_name="BAAI/bge-base-en-v1.5")
|
32 |
vector_store = FAISS.from_texts(text_chunks, embedding=embeddings)
|
33 |
vector_store.save_local("faiss_index")
|
34 |
|