From def0a23726b7d4a43e7d6ed6dee8622ad3ee1fd4 Mon Sep 17 00:00:00 2001 From: Jael Gu Date: Sat, 2 Apr 2022 12:31:42 +0800 Subject: [PATCH] Update readme Signed-off-by: Jael Gu --- README.md | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 096603d..9bee5c3 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ This operator is implemented with pretrained models from [Huggingface Transforme Use the pretrained model 'distilbert-base-cased' to generate a text embedding for the sentence "Hello, world.". - *Write the pipeline in simplified style*: + *Write the pipeline*: ```python from towhee import dc @@ -26,19 +26,6 @@ dc.stream(["Hello, world."]) .show() ``` -*Write a same pipeline with explicit inputs/outputs name specifications:* - -```python -from towhee import dc - - -dc.stream['txt'](["Hello, world."]) - .text_embedding.transformers['txt', 'vec']('distilbert-base-cased') - .select('txt', 'vec') - .show() -``` - - ## Factory Constructor Create the operator via the following factory method @@ -57,7 +44,7 @@ You can get the list of supported model names by calling `get_model_list` from [ The operator takes a text in string as input. It loads tokenizer and pre-trained model using model name. -Text embeddings are returned in ndarray. +and then return text embedding in ndarray. **Parameters:**