jiechau commited on
Commit
c60bc4e
1 Parent(s): 2871429

Upload TFBertForSequenceClassification

Browse files
Files changed (3) hide show
  1. README.md +29 -32
  2. config.json +8 -8
  3. tf_model.h5 +1 -1
README.md CHANGED
@@ -2,48 +2,45 @@
2
  tags:
3
  - generated_from_keras_callback
4
  model-index:
5
- - name: adult-content-classifier-text
6
  results: []
7
- pipeline_tag: text-classification
8
- widget:
9
- - text: 情趣睡衣 性感睡衣 角色扮演 惹火 緊身連身 漆皮膠衣 黑 L
10
- example_title: adult_成人商品標題
11
- - text: 男平織運動外套-立領外套 慢跑 路跑 藍黑螢光黃 L
12
- example_title: regular_一般商品標題
13
- - text: 'Passionate Embrace: Cross-Laced Sexy Silky Lingerie Sleepwear, White'
14
- example_title: adult_product
15
- - text: >-
16
- Men's Plain Weave Sports Jacket - Stand Collar Jacket for Jogging and
17
- Running, Blue-Black-Fluorescent Yellow, Size L
18
- example_title: regular_product
19
- license: mit
20
- language:
21
- - en
22
- - zh
23
  ---
 
24
  <!-- This model card has been generated automatically according to the information Keras had access to. You should
25
  probably proofread and complete it, then remove this comment. -->
26
 
27
  # adult-content-identify-text
28
 
29
- Determine whether online sales products are adult content. Input: product title or description, Output results: 0 Unknown, 1 Adult Content, 2 General Merchandise.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
30
 
31
- 判斷網路銷售商品是否屬於成人內容。輸入: 商品名稱文字,輸出結果: 0 未知, 1 成人內容, 2 一般商品。
32
 
33
- # use transformers pipeline
34
- ```python
35
- from transformers import pipeline
36
- pipe = pipeline("text-classification", model="jiechau/adult-content-classifier")
37
- #q = '男平織運動外套-立領外套 慢跑 路跑 藍黑螢光黃 L'
38
- q = '情趣睡衣 性感睡衣 角色扮演 惹火 緊身連身 漆皮膠衣 黑 L'
39
- result = pipe(q)
40
- print(result)
41
- # [{'label': 'adult_成人商品', 'score': 0.9994813799858093}]
42
- ```
43
 
44
  ### Framework versions
45
 
46
- - Transformers 4.37.1
47
  - TensorFlow 2.15.0
48
- - Datasets 2.17.0
49
- - Tokenizers 0.15.1
 
2
  tags:
3
  - generated_from_keras_callback
4
  model-index:
5
+ - name: adult-content-identify-text
6
  results: []
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7
  ---
8
+
9
  <!-- This model card has been generated automatically according to the information Keras had access to. You should
10
  probably proofread and complete it, then remove this comment. -->
11
 
12
  # adult-content-identify-text
13
 
14
+ This model was trained from scratch on an unknown dataset.
15
+ It achieves the following results on the evaluation set:
16
+
17
+
18
+ ## Model description
19
+
20
+ More information needed
21
+
22
+ ## Intended uses & limitations
23
+
24
+ More information needed
25
+
26
+ ## Training and evaluation data
27
+
28
+ More information needed
29
+
30
+ ## Training procedure
31
+
32
+ ### Training hyperparameters
33
+
34
+ The following hyperparameters were used during training:
35
+ - optimizer: None
36
+ - training_precision: float32
37
+
38
+ ### Training results
39
 
 
40
 
 
 
 
 
 
 
 
 
 
 
41
 
42
  ### Framework versions
43
 
44
+ - Transformers 4.38.2
45
  - TensorFlow 2.15.0
46
+ - Tokenizers 0.15.2
 
config.json CHANGED
@@ -1,5 +1,5 @@
1
  {
2
- "_name_or_path": "/home/jie/model/text",
3
  "architectures": [
4
  "BertForSequenceClassification"
5
  ],
@@ -11,16 +11,16 @@
11
  "hidden_dropout_prob": 0.1,
12
  "hidden_size": 768,
13
  "id2label": {
14
- "0": "unknown",
15
- "1": "adult_\u6210\u4eba\u5546\u54c1",
16
- "2": "regular_\u4e00\u822c\u5546\u54c1"
17
  },
18
  "initializer_range": 0.02,
19
  "intermediate_size": 3072,
20
  "label2id": {
21
- "adult_\u6210\u4eba\u5546\u54c1": 1,
22
- "regular_\u4e00\u822c\u5546\u54c1": 2,
23
- "unknown": 0
24
  },
25
  "layer_norm_eps": 1e-05,
26
  "max_position_embeddings": 514,
@@ -30,7 +30,7 @@
30
  "output_past": true,
31
  "pad_token_id": 1,
32
  "position_embedding_type": "absolute",
33
- "transformers_version": "4.37.1",
34
  "type_vocab_size": 1,
35
  "use_cache": true,
36
  "vocab_size": 250002
 
1
  {
2
+ "_name_or_path": "/home/rundeck/_ai_bulk_files/Colab_Notebooks/_saved_model/_saved_model_friDay/friDay_adult_sexy/FacebookAI-xlm-roberta-base-tf-keras",
3
  "architectures": [
4
  "BertForSequenceClassification"
5
  ],
 
11
  "hidden_dropout_prob": 0.1,
12
  "hidden_size": 768,
13
  "id2label": {
14
+ "0": "LABEL_0",
15
+ "1": "LABEL_1",
16
+ "2": "LABEL_2"
17
  },
18
  "initializer_range": 0.02,
19
  "intermediate_size": 3072,
20
  "label2id": {
21
+ "LABEL_0": 0,
22
+ "LABEL_1": 1,
23
+ "LABEL_2": 2
24
  },
25
  "layer_norm_eps": 1e-05,
26
  "max_position_embeddings": 514,
 
30
  "output_past": true,
31
  "pad_token_id": 1,
32
  "position_embedding_type": "absolute",
33
+ "transformers_version": "4.38.2",
34
  "type_vocab_size": 1,
35
  "use_cache": true,
36
  "vocab_size": 250002
tf_model.h5 CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:a461b2d560dde6bec8706a1ac9da1412397c0e3bf8aa3c3aef90457a06c161f1
3
  size 1112471836
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c44889ea931a7a55e38a495430be4f547cdbf2183ba62d1bdb90ccac4b7c1199
3
  size 1112471836