diff --git a/README.md b/README.md index 442e6f4..ce2948c 100644 --- a/README.md +++ b/README.md @@ -27,11 +27,17 @@ 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.realm(model_name="google/realm-cc-news-pretrained-embedder") +p = ( + pipe.input('text') + .map('text', 'vec', ops.text_embedding.realm(model_name="google/realm-cc-news-pretrained-embedder")) + .output('text', 'vec') +) + +DataCollection(p('Hello, world.')).show() ``` +
diff --git a/result.png b/result.png new file mode 100644 index 0000000..3624353 Binary files /dev/null and b/result.png differ