logo
Browse Source

Update with loader

Signed-off-by: shiyu22 <shiyu.chen@zilliz.com>
main
shiyu22 2 years ago
parent
commit
16695b7763
  1. 1
      README.md
  2. 2
      eqa_insert.py

1
README.md

@ -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')

2
eqa_insert.py

@ -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 = {}

Loading…
Cancel
Save