Update README.md
Browse files
README.md
CHANGED
|
@@ -38,6 +38,25 @@ vuln-cat is a classification model based on fine-tuning of scibert. It categoriz
|
|
| 38 |
'xxe'
|
| 39 |
]
|
| 40 |
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 41 |
## Intended uses & limitations
|
| 42 |
|
| 43 |
More information needed
|
|
|
|
| 38 |
'xxe'
|
| 39 |
]
|
| 40 |
```
|
| 41 |
+
|
| 42 |
+
## Usage
|
| 43 |
+
```python
|
| 44 |
+
from transformers import pipeline
|
| 45 |
+
|
| 46 |
+
text = 'A path traversal exists in a specific dll of Trend Micro Mobile Security (Enterprise) 9.8 SP5 which could allow an authenticated remote attacker to delete arbitrary files.'
|
| 47 |
+
|
| 48 |
+
classifier = pipeline(
|
| 49 |
+
"text-classification",
|
| 50 |
+
model="conflick0/vuln-cat",
|
| 51 |
+
padding=True,
|
| 52 |
+
truncation=True,
|
| 53 |
+
max_length=512,
|
| 54 |
+
)
|
| 55 |
+
|
| 56 |
+
classifier(text)
|
| 57 |
+
# [{'label': 'directory_traversal', 'score': 0.9969494938850403}]
|
| 58 |
+
```
|
| 59 |
+
|
| 60 |
## Intended uses & limitations
|
| 61 |
|
| 62 |
More information needed
|