From 671ed01d78798674d69e043b7979f4d821efa4c1 Mon Sep 17 00:00:00 2001 From: Jael Gu Date: Sat, 2 Apr 2022 15:31:38 +0800 Subject: [PATCH] Update Signed-off-by: Jael Gu --- README.md | 2 +- auto_transformers.py | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 9bee5c3..e3d7edb 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ from towhee import dc dc.stream(["Hello, world."]) - .text_embedding.transformers('distilbert-base-cased') + .text_embedding.transformers(model_name="distilbert-base-cased") .show() ``` diff --git a/auto_transformers.py b/auto_transformers.py index 80e2a55..955ba6f 100644 --- a/auto_transformers.py +++ b/auto_transformers.py @@ -12,15 +12,14 @@ # See the License for the specific language governing permissions and # limitations under the License. -import logging import numpy - from transformers import AutoTokenizer, AutoModel from towhee.operator import NNOperator from towhee import register import warnings +import logging warnings.filterwarnings('ignore') logging.getLogger("transformers").setLevel(logging.ERROR)