Spaces:
Running
on
Zero
Running
on
Zero
πwπ
Browse files
app.py
CHANGED
@@ -33,7 +33,7 @@ data.add_faiss_index("embedding")
|
|
33 |
|
34 |
@spaces.GPU
|
35 |
def search(query: str, k: int = TOP_K):
|
36 |
-
embedded_query =
|
37 |
scores, retrieved_examples = data.get_nearest_examples(
|
38 |
"embedding", embedded_query, k=k
|
39 |
)
|
@@ -101,7 +101,9 @@ def talk(message, history):
|
|
101 |
TITLE = "RAG"
|
102 |
|
103 |
DESCRIPTION = """
|
104 |
-
|
|
|
|
|
105 |
* embedding model : https://huggingface.co/mixedbread-ai/mxbai-embed-large-v1
|
106 |
* dataset : https://huggingface.co/datasets/not-lain/wikipedia-small-3000-embedded (used mxbai-colbert-large-v1 to create the embedding column )
|
107 |
* faiss docs : https://huggingface.co/docs/datasets/v2.18.0/en/package_reference/main_classes#datasets.Dataset.add_faiss_index
|
|
|
33 |
|
34 |
@spaces.GPU
|
35 |
def search(query: str, k: int = TOP_K):
|
36 |
+
embedded_query = RAG.encode(query)
|
37 |
scores, retrieved_examples = data.get_nearest_examples(
|
38 |
"embedding", embedded_query, k=k
|
39 |
)
|
|
|
101 |
TITLE = "RAG"
|
102 |
|
103 |
DESCRIPTION = """
|
104 |
+
A rag pipeline with a chatbot feature
|
105 |
+
|
106 |
+
Resources used to build this project :
|
107 |
* embedding model : https://huggingface.co/mixedbread-ai/mxbai-embed-large-v1
|
108 |
* dataset : https://huggingface.co/datasets/not-lain/wikipedia-small-3000-embedded (used mxbai-colbert-large-v1 to create the embedding column )
|
109 |
* faiss docs : https://huggingface.co/docs/datasets/v2.18.0/en/package_reference/main_classes#datasets.Dataset.add_faiss_index
|