logo
Browse Source

Update

Signed-off-by: Jael Gu <mengjia.gu@zilliz.com>
main
Jael Gu 3 years ago
parent
commit
e3ca09f145
  1. 2
      README.md
  2. 4
      __init__.py

2
README.md

@ -13,7 +13,7 @@ A text embedding operator implemented with pretrained models from [Huggingface T
```python ```python
from towhee import ops 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.") text_embedding = text_encoder("Hello, world.")
``` ```

4
__init__.py

@ -15,5 +15,5 @@
from .auto_transformers import AutoTransformers from .auto_transformers import AutoTransformers
def transformers():
return AutoTransformers()
def transformers(model_name: str):
return AutoTransformers(model_name)

Loading…
Cancel
Save