Browse Source
Update with loader
Signed-off-by: shiyu22 <shiyu.chen@zilliz.com>
main
2 changed files with
2 additions and
1 deletions
-
README.md
-
eqa_insert.py
|
@ -53,6 +53,7 @@ config.model = 'all-MiniLM-L6-v2' |
|
|
config.host = '127.0.0.1' |
|
|
config.host = '127.0.0.1' |
|
|
config.port = '19530' |
|
|
config.port = '19530' |
|
|
config.collection_name = collection_name |
|
|
config.collection_name = collection_name |
|
|
|
|
|
config.source_type = 'url' |
|
|
|
|
|
|
|
|
p = AutoPipes.pipeline('eqa-insert', config=config) |
|
|
p = AutoPipes.pipeline('eqa-insert', config=config) |
|
|
res = p('https://raw.githubusercontent.com/towhee-io/towhee/main/README.md') |
|
|
res = p('https://raw.githubusercontent.com/towhee-io/towhee/main/README.md') |
|
|
|
@ -69,7 +69,7 @@ def _get_embedding_op(config): |
|
|
|
|
|
|
|
|
@AutoPipes.register |
|
|
@AutoPipes.register |
|
|
def enhanced_qa_insert_pipe(config): |
|
|
def enhanced_qa_insert_pipe(config): |
|
|
text_load_op = ops.text_loader() |
|
|
|
|
|
|
|
|
text_load_op = ops.text_loader(chunk_size=config.chunk_size, source_type=config.source_type) |
|
|
|
|
|
|
|
|
allow_triton, sentence_embedding_op = _get_embedding_op(config) |
|
|
allow_triton, sentence_embedding_op = _get_embedding_op(config) |
|
|
sentence_embedding_config = {} |
|
|
sentence_embedding_config = {} |
|
|