cedricbonhomme commited on
Commit
8fc2ccc
·
verified ·
1 Parent(s): 6a38d24

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +32 -14
README.md CHANGED
@@ -1,37 +1,55 @@
 
1
  ---
 
 
 
2
  library_name: transformers
3
  license: apache-2.0
4
- base_model: hfl/chinese-macbert-base
5
- tags:
6
- - generated_from_trainer
7
  metrics:
8
  - accuracy
 
 
 
 
 
 
 
 
 
9
  model-index:
10
  - name: vulnerability-severity-classification-chinese-macbert-base
11
  results: []
12
  ---
13
 
14
- <!-- This model card has been generated automatically according to the information the Trainer had access to. You
15
- should probably proofread and complete it, then remove this comment. -->
 
16
 
17
- # vulnerability-severity-classification-chinese-macbert-base
18
 
19
- This model is a fine-tuned version of [hfl/chinese-macbert-base](https://huggingface.co/hfl/chinese-macbert-base) on an unknown dataset.
20
  It achieves the following results on the evaluation set:
 
21
  - Loss: 0.6172
22
  - Accuracy: 0.7817
23
 
24
- ## Model description
25
-
26
- More information needed
27
 
28
- ## Intended uses & limitations
29
 
30
- More information needed
 
31
 
32
- ## Training and evaluation data
 
 
 
33
 
34
- More information needed
 
 
 
 
 
35
 
36
  ## Training procedure
37
 
 
1
+
2
  ---
3
+ base_model: hfl/chinese-macbert-base
4
+ datasets:
5
+ - CIRCL/Vulnerability-CNVD
6
  library_name: transformers
7
  license: apache-2.0
 
 
 
8
  metrics:
9
  - accuracy
10
+ tags:
11
+ - generated_from_trainer
12
+ - text-classification
13
+ - classification
14
+ - nlp
15
+ - chinese
16
+ - vulnerability
17
+ pipeline_tag: text-classification
18
+ language: zh
19
  model-index:
20
  - name: vulnerability-severity-classification-chinese-macbert-base
21
  results: []
22
  ---
23
 
24
+ # VLAI: A RoBERTa-Based Model for Automated Vulnerability Severity Classification (Chinese Text)
25
+
26
+ This model is a fine-tuned version of [hfl/chinese-macbert-base](https://huggingface.co/hfl/chinese-macbert-base) on the dataset [CIRCL/Vulnerability-CNVD](https://huggingface.co/datasets/CIRCL/Vulnerability-CNVD).
27
 
28
+ For more information, visit the [Vulnerability-Lookup project page](https://vulnerability.circl.lu) or the [ML-Gateway GitHub repository](https://github.com/vulnerability-lookup/ML-Gateway), which demonstrates its usage in a FastAPI server.
29
 
 
30
  It achieves the following results on the evaluation set:
31
+
32
  - Loss: 0.6172
33
  - Accuracy: 0.7817
34
 
35
+ ## How to use
 
 
36
 
37
+ You can use this model directly with the Hugging Face `transformers` library for text classification:
38
 
39
+ ```python
40
+ from transformers import pipeline
41
 
42
+ classifier = pipeline(
43
+ "text-classification",
44
+ model="CIRCL/vulnerability-severity-classification-chinese-macbert-base"
45
+ )
46
 
47
+ # Example usage for a Chinese vulnerability description
48
+ description_chinese = "TOTOLINK A3600R是中国吉翁电子(TOTOLINK)公司的一款6天线1200M无线路由器。TOTOLINK A3600R存在缓冲区溢出漏洞,该漏洞源于/cgi-bin/cstecgi.cgi文件的UploadCustomModule函数中的File参数未能正确验证输入数据的长度大小,攻击者可利用该漏洞在系统上执行任意代码或者导致拒绝服务。"
49
+ result_chinese = classifier(description_chinese)
50
+ print(result_chinese)
51
+ # Expected output example: [{'label': '高', 'score': 0.9802}]
52
+ ```
53
 
54
  ## Training procedure
55