From a535facd879305a798eba6f60b6263ec5d717741 Mon Sep 17 00:00:00 2001 From: Jael Gu Date: Thu, 7 Apr 2022 17:32:14 +0800 Subject: [PATCH] Update README Signed-off-by: Jael Gu --- README.md | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index feb0eae..c066b08 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ *author: Jael Gu* - +
## Desription @@ -17,12 +17,14 @@ The original model was proposed in REALM: Retrieval-Augmented Language Model Pre [2].https://arxiv.org/abs/2002.08909 +
+ ## Code Example Use the pretrained model "google/realm-cc-news-pretrained-embedder" to generate a text embedding for the sentence "Hello, world.". - *Write the pipeline*: +*Write the pipeline*: ```python from towhee import dc @@ -33,6 +35,8 @@ dc.stream(["Hello, world."]) \ .to_list() ``` +
+ ## Factory Constructor Create the operator via the following factory method @@ -41,11 +45,12 @@ Create the operator via the following factory method **Parameters:** -​ ***model_name***: *str* +***model_name***: *str* -​ The model name in string. +The model name in string. You can get the list of supported model names by calling `get_model_list` from [realm.py](https://towhee.io/text-embedding/realm/src/branch/main/realm.py). +
## Interface @@ -56,9 +61,9 @@ and then return text embedding in ndarray. **Parameters:** -​ ***text***: *str* +***text***: *str* -​ The text in string. +The text in string.