From c8726607775add83b03120f9993b671e73bbc18d Mon Sep 17 00:00:00 2001 From: Jael Gu Date: Wed, 8 Feb 2023 16:50:37 +0800 Subject: [PATCH] Update Signed-off-by: Jael Gu --- README.md | 12 +++++++++--- result.png | Bin 0 -> 5692 bytes 2 files changed, 9 insertions(+), 3 deletions(-) create mode 100644 result.png 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 0000000000000000000000000000000000000000..36243530cdeff8dd74810a1569443a2b99d5f175 GIT binary patch literal 5692 zcmY*d1yB^g*FQW;8UcX=q(eGRItAg5yhBnEX*fW-5swDxj-w>*00rd`K}tYcq>dIr zy1S(L@c+fkH?wblZ{FLT+4pwd#_ugmSA(1cL;?T+$e|E5eESW8@rh@^OoR948Sips=8W-a0S1hEPj#6psUldaZyTy! zoc5nK%oo4%Zu7g_3#s@bi{-8Rg$*MUip5{&K|a^2o;6Bs+koL8-V;x+HgPm&6IZBl zdXFsS#f1xC-_@tT7u}5B3we0UkB^Cv&pX&0z`{idDe}g5sSDe=3L@CfleNR$T-e`} zkF^MstMhb9L^p87-fxqrNHV&n^}DW%3>k5_M}4T!D(%}kzV+!?pkL7`V!U}q324hGS-NN5j?4*dkPnM>BNYK$G5J{T+Sd5iAwS4&0m97KdBaL2*SoumIL*|l|k#KHl z$j!bVb&Ll@4{NvTHS53)=+x`w<9R4N*uD#jMS$50=IuF{WUDHM9G=aU+Tr||y8Il$ z`$O~#NAT#u-muf`tUh7zHoV^r__w-PgOk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