From e3ca09f145b3d75e356ce57830c4e3c55bd30908 Mon Sep 17 00:00:00 2001 From: Jael Gu Date: Mon, 28 Mar 2022 14:38:53 +0800 Subject: [PATCH] Update Signed-off-by: Jael Gu --- README.md | 2 +- __init__.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 3e61838..e943a57 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ A text embedding operator implemented with pretrained models from [Huggingface T ```python from towhee import ops -text_encoder = ops.text_embedding.transformers("bert-base-cased") +text_encoder = ops.text_embedding.transformers(model_name="bert-base-cased") text_embedding = text_encoder("Hello, world.") ``` diff --git a/__init__.py b/__init__.py index 846a47a..b6d9faf 100644 --- a/__init__.py +++ b/__init__.py @@ -15,5 +15,5 @@ from .auto_transformers import AutoTransformers -def transformers(): - return AutoTransformers() +def transformers(model_name: str): + return AutoTransformers(model_name)