jiechau's picture
Update README.md
e08e8fd verified
---
tags:
- generated_from_keras_callback
- classifier
- adult-content-identify-text
- adult
- adult-content
- text-classifier
- text
- classifier
model-index:
- name: adult-content-classifier-text
results: []
pipeline_tag: text-classification
widget:
- text: 情趣睡衣 性感睡衣 角色扮演 惹火 緊身連身 漆皮膠衣 L
example_title: adult_成人商品標題
- text: 男平織運動外套-立領外套 慢跑 路跑 藍黑螢光黃 L
example_title: regular_一般商品標題
- text: 'Passionate Embrace: Cross-Laced Sexy Silky Lingerie Sleepwear, White'
example_title: adult_product
- text: >-
Men's Plain Weave Sports Jacket - Stand Collar Jacket for Jogging and
Running, Blue-Black-Fluorescent Yellow, Size L
example_title: regular_product
license: mit
language:
- en
- zh
- ko
- ja
---
# adult-content-identify-text
(image version [here](https://huggingface.co/jiechau/adult-content-identify-image) 圖形版本請參考 [這裡](https://huggingface.co/jiechau/adult-content-identify-image))
Support languages: English, Chinese (both CN/TW), Japanese, Korean
Determine whether online sales product is adult content. Input: text of product title or description, Output result: 0 Unsure, 1 Adult Content, 2 General Merchandise.
判斷網路銷售商品是否屬於成人內容。輸入: 商品名稱文字,輸出結果: 0 未知, 1 成人內容, 2 一般商品。
判断网络销售的商品是否属于成人内容。输入:商品名称文本,输出结果:0 不确定,1 成人内容,2 普通商品。
ネット販売の商品がアダルトコンテンツに属するかどうかを判断します。入力: 商品名のテキスト、出力結果: 0 不明、1 アダルトコンテンツ、2 一般商品。
인터넷 판매 상품이 성인 내용에 속하는지 판단합니다. 입력: 상품 이름 텍스트, 출력 결과: 0 불확실, 1 성인 내용, 2 일반 상품.
# use transformers pipeline
```python
from transformers import pipeline, AutoConfig
pipe = pipeline("text-classification", model="jiechau/adult-content-identify-text")
config = AutoConfig.from_pretrained("jiechau/adult-content-identify-text")
label2id = config.label2id
id2label = config.id2label
#q = 'Men's Plain Weave Sports Jacket - Stand Collar Jacket for Jogging and Running, Blue-Black-Fluorescent Yellow, Size L'
#q = 'Passionate Embrace: Cross-Laced Sexy Silky Lingerie Sleepwear, White'
#q = '男平織運動外套-立領外套 慢跑 路跑 藍黑螢光黃 L'
q = '情趣睡衣 性感睡衣 角色扮演 惹火 緊身連身 漆皮膠衣 黑 L'
result = pipe(q)
print(result)
print(label2id[result[0]['label']])
# [{'label': 'adult_成人商品', 'score': 0.9994813799858093}]
# 1
```
### Framework versions
- Transformers 4.37.1
- TensorFlow 2.15.0
- Datasets 2.17.0
- Tokenizers 0.15.1