logo
Browse Source

Debug

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

12
README.md

@ -50,13 +50,7 @@ Create the operator via the following factory method
***model_name***: *str*
​ The model name in string.
You can get the list of supported model names by calling `model_list` of the operator:
```python
from towhee import ops
ops.text_embedding.transformers.model_list()
```
You can get the list of supported model names by calling `get_model_list`.
## Interface
@ -74,7 +68,9 @@ Text embeddings are returned in ndarray.
**Returns**: *numpy.ndarray*
**Returns**:
​ *numpy.ndarray*
​ The text embedding extracted by model.

10
__init__.py

@ -12,12 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from .auto_transformers import AutoTransformers, get_model_list
from .auto_transformers import AutoTransformers
def transformers(model_name: str):
return AutoTransformers(model_name)
def model_list():
return get_model_list()
def transformers(**kwargs):
return AutoTransformers(**kwargs)

Loading…
Cancel
Save