Spaces:
Sleeping
Sleeping
dinhquangson
commited on
Commit
•
cb29b7d
1
Parent(s):
1b9551a
Update app.py
Browse files
app.py
CHANGED
@@ -136,7 +136,7 @@ async def create_upload_file(text_field: str, file: UploadFile = File(...), ocr:
|
|
136 |
|
137 |
|
138 |
indexing = Pipeline()
|
139 |
-
indexing.add_component("sparse_doc_embedder", FastembedSparseDocumentEmbedder(model="
|
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 |
|
@@ -191,7 +191,7 @@ def search(prompt: str):
|
|
191 |
generation_kwargs = {"max_tokens": 512}
|
192 |
)
|
193 |
querying = Pipeline()
|
194 |
-
querying.add_component("sparse_text_embedder", FastembedSparseTextEmbedder(model="
|
195 |
querying.add_component("dense_text_embedder", FastembedTextEmbedder(
|
196 |
model="sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2", prefix="Represent this sentence for searching relevant passages: ")
|
197 |
)
|
|
|
136 |
|
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 |
|
|
|
191 |
generation_kwargs = {"max_tokens": 512}
|
192 |
)
|
193 |
querying = Pipeline()
|
194 |
+
querying.add_component("sparse_text_embedder", FastembedSparseTextEmbedder(model="Qdrant/bm42-all-minilm-l6-v2-attentions '"))
|
195 |
querying.add_component("dense_text_embedder", FastembedTextEmbedder(
|
196 |
model="sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2", prefix="Represent this sentence for searching relevant passages: ")
|
197 |
)
|