Spaces:
Sleeping
Sleeping
dinhquangson
commited on
Commit
•
830073a
1
Parent(s):
e66b1e2
Update app.py
Browse files
app.py
CHANGED
@@ -137,7 +137,7 @@ async def create_upload_file(text_field: str, file: UploadFile = File(...), ocr:
|
|
137 |
|
138 |
indexing = Pipeline()
|
139 |
indexing.add_component("sparse_doc_embedder", FastembedSparseDocumentEmbedder(model="Qdrant/bm42-all-minilm-l6-v2-attentions"))
|
140 |
-
indexing.add_component("dense_doc_embedder", FastembedDocumentEmbedder(model="
|
141 |
indexing.add_component("writer", DocumentWriter(document_store=document_store, policy=DuplicatePolicy.OVERWRITE))
|
142 |
indexing.connect("sparse_doc_embedder", "dense_doc_embedder")
|
143 |
indexing.connect("dense_doc_embedder", "writer")
|
@@ -169,7 +169,7 @@ def search(prompt: str):
|
|
169 |
querying = Pipeline()
|
170 |
querying.add_component("sparse_text_embedder", FastembedSparseTextEmbedder(model="Qdrant/bm42-all-minilm-l6-v2-attentions"))
|
171 |
querying.add_component("dense_text_embedder", FastembedTextEmbedder(
|
172 |
-
model="
|
173 |
)
|
174 |
querying.add_component("retriever", QdrantHybridRetriever(document_store=document_store))
|
175 |
querying.add_component("document_joiner", DocumentJoiner())
|
|
|
137 |
|
138 |
indexing = Pipeline()
|
139 |
indexing.add_component("sparse_doc_embedder", FastembedSparseDocumentEmbedder(model="Qdrant/bm42-all-minilm-l6-v2-attentions"))
|
140 |
+
indexing.add_component("dense_doc_embedder", FastembedDocumentEmbedder(model="sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2"))
|
141 |
indexing.add_component("writer", DocumentWriter(document_store=document_store, policy=DuplicatePolicy.OVERWRITE))
|
142 |
indexing.connect("sparse_doc_embedder", "dense_doc_embedder")
|
143 |
indexing.connect("dense_doc_embedder", "writer")
|
|
|
169 |
querying = Pipeline()
|
170 |
querying.add_component("sparse_text_embedder", FastembedSparseTextEmbedder(model="Qdrant/bm42-all-minilm-l6-v2-attentions"))
|
171 |
querying.add_component("dense_text_embedder", FastembedTextEmbedder(
|
172 |
+
model="sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2", prefix="Represent this sentence for searching relevant passages: ")
|
173 |
)
|
174 |
querying.add_component("retriever", QdrantHybridRetriever(document_store=document_store))
|
175 |
querying.add_component("document_joiner", DocumentJoiner())
|