Spaces:
Sleeping
Sleeping
João Lima
commited on
Commit
·
378356c
1
Parent(s):
56a2140
Fix gradio Blocks context
Browse files- rag/__pycache__/retriever.cpython-312.pyc +0 -0
- rag/retriever.py +1 -5
- requirements.txt +1 -0
rag/__pycache__/retriever.cpython-312.pyc
CHANGED
|
Binary files a/rag/__pycache__/retriever.cpython-312.pyc and b/rag/__pycache__/retriever.cpython-312.pyc differ
|
|
|
rag/retriever.py
CHANGED
|
@@ -1,12 +1,8 @@
|
|
| 1 |
-
from
|
| 2 |
from langchain_community.vectorstores import FAISS
|
| 3 |
from config import EMBEDDING_MODEL
|
| 4 |
|
| 5 |
-
|
| 6 |
_embeddings = HuggingFaceEmbeddings(model_name=EMBEDDING_MODEL)
|
| 7 |
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
def build_vectorstore(documents):
|
| 12 |
return FAISS.from_documents(documents, _embeddings)
|
|
|
|
| 1 |
+
from langchain_huggingface import HuggingFaceEmbeddings
|
| 2 |
from langchain_community.vectorstores import FAISS
|
| 3 |
from config import EMBEDDING_MODEL
|
| 4 |
|
|
|
|
| 5 |
_embeddings = HuggingFaceEmbeddings(model_name=EMBEDDING_MODEL)
|
| 6 |
|
|
|
|
|
|
|
|
|
|
| 7 |
def build_vectorstore(documents):
|
| 8 |
return FAISS.from_documents(documents, _embeddings)
|
requirements.txt
CHANGED
|
@@ -8,5 +8,6 @@ langchain
|
|
| 8 |
langchain-core
|
| 9 |
langchain-community
|
| 10 |
langchain-text-splitters
|
|
|
|
| 11 |
|
| 12 |
faiss-cpu
|
|
|
|
| 8 |
langchain-core
|
| 9 |
langchain-community
|
| 10 |
langchain-text-splitters
|
| 11 |
+
langchain-huggingface
|
| 12 |
|
| 13 |
faiss-cpu
|