Browse Source
Update README
Signed-off-by: Jael Gu <mengjia.gu@zilliz.com>
main
1 changed files with
4 additions and
3 deletions
-
README.md
|
|
@ -33,7 +33,8 @@ to generate a text embedding for the sentence "Hello, world.". |
|
|
|
import towhee |
|
|
|
|
|
|
|
towhee.dc(["Hello, world."]) \ |
|
|
|
.text_embedding.longformer(model_name=c"allenai/longformer-base-4096") |
|
|
|
.text_embedding.longformer(model_name="allenai/longformer-base-4096") \ |
|
|
|
.to_list() |
|
|
|
``` |
|
|
|
|
|
|
|
<br /> |
|
|
@ -42,7 +43,7 @@ towhee.dc(["Hello, world."]) \ |
|
|
|
|
|
|
|
Create the operator via the following factory method: |
|
|
|
|
|
|
|
***text_embedding.dpr(model_name="allenai/longformer-base-4096")*** |
|
|
|
***text_embedding.longformer(model_name="allenai/longformer-base-4096")*** |
|
|
|
|
|
|
|
**Parameters:** |
|
|
|
|
|
|
@ -77,4 +78,4 @@ The text in string. |
|
|
|
|
|
|
|
*numpy.ndarray* |
|
|
|
|
|
|
|
The text embedding extracted by model. |
|
|
|
The text embedding extracted by model. |
|
|
|