diff --git a/README.md b/README.md index 2e6111d..2e2bfb1 100644 --- a/README.md +++ b/README.md @@ -30,13 +30,19 @@ to generate a text embedding for the sentence "Hello, world.". *Write the pipeline*: ```python -import towhee +from towhee.dc2 import pipe, ops, DataCollection -towhee.dc(["Hello, world."]) \ - .text_embedding.longformer(model_name="allenai/longformer-base-4096") \ - .to_list() +p = ( + pipe.input('text') + .map('text', 'vec', ops.text_embedding.longformer(model_name="allenai/longformer-base-4096")) + .output('text', 'vec') +) + +DataCollection(p('Hello, world.')).show() ``` + +
## Factory Constructor diff --git a/result.png b/result.png new file mode 100644 index 0000000..609a135 Binary files /dev/null and b/result.png differ