logo
Browse Source

Update

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

2
README.md

@ -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()
``` ```

3
auto_transformers.py

@ -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)

Loading…
Cancel
Save