Browse Source
Update
Signed-off-by: Jael Gu <mengjia.gu@zilliz.com>
main
2 changed files with
2 additions and
3 deletions
-
README.md
-
auto_transformers.py
|
@ -22,7 +22,7 @@ from towhee import dc |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dc.stream(["Hello, world."]) |
|
|
dc.stream(["Hello, world."]) |
|
|
.text_embedding.transformers('distilbert-base-cased') |
|
|
|
|
|
|
|
|
.text_embedding.transformers(model_name="distilbert-base-cased") |
|
|
.show() |
|
|
.show() |
|
|
``` |
|
|
``` |
|
|
|
|
|
|
|
|
|
@ -12,15 +12,14 @@ |
|
|
# See the License for the specific language governing permissions and |
|
|
# See the License for the specific language governing permissions and |
|
|
# limitations under the License. |
|
|
# limitations under the License. |
|
|
|
|
|
|
|
|
import logging |
|
|
|
|
|
import numpy |
|
|
import numpy |
|
|
|
|
|
|
|
|
from transformers import AutoTokenizer, AutoModel |
|
|
from transformers import AutoTokenizer, AutoModel |
|
|
|
|
|
|
|
|
from towhee.operator import NNOperator |
|
|
from towhee.operator import NNOperator |
|
|
from towhee import register |
|
|
from towhee import register |
|
|
|
|
|
|
|
|
import warnings |
|
|
import warnings |
|
|
|
|
|
import logging |
|
|
|
|
|
|
|
|
warnings.filterwarnings('ignore') |
|
|
warnings.filterwarnings('ignore') |
|
|
logging.getLogger("transformers").setLevel(logging.ERROR) |
|
|
logging.getLogger("transformers").setLevel(logging.ERROR) |
|
|