Devang007 commited on
Commit
51d671c
·
verified ·
1 Parent(s): 7283fd0

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +12 -1
README.md CHANGED
@@ -16,6 +16,16 @@ tags:
16
  Query your nginx logs in plain English — fully offline, read-only, 15M params.
17
 
18
 
 
 
 
 
 
 
 
 
 
 
19
  Run directly with 🤗 Transformers:
20
 
21
  ```python
@@ -26,7 +36,8 @@ ids = tok("parse: how many 502s in the last hour", return_tensors="pt").input_id
26
  print(tok.decode(model.generate(ids, max_length=128)[0], skip_special_tokens=True))
27
  # {"action":"count","source":"nginx_access","filters":[{"field":"status","op":"eq","value":"502"}],"time":{"last":"1h"}}
28
  ```
29
-
 
30
 
31
  NL → nginx-log-query translation model. Fine-tune of
32
  [`google/t5-efficient-tiny`](https://huggingface.co/google/t5-efficient-tiny)
 
16
  Query your nginx logs in plain English — fully offline, read-only, 15M params.
17
 
18
 
19
+ ## How to use
20
+
21
+ Via the CLI (recommended — includes validation + safe execution):
22
+
23
+ ```bash
24
+ git clone https://github.com/devang007/logX && cd logX
25
+ ./install.sh # downloads this model zip automatically
26
+ logx -q "top 5 ips" -src /var/log/nginx/access.log
27
+ ```
28
+
29
  Run directly with 🤗 Transformers:
30
 
31
  ```python
 
36
  print(tok.decode(model.generate(ids, max_length=128)[0], skip_special_tokens=True))
37
  # {"action":"count","source":"nginx_access","filters":[{"field":"status","op":"eq","value":"502"}],"time":{"last":"1h"}}
38
  ```
39
+ But this would only give you the commands to run , parser and cli commands would run those dsl on terminal , so to really query your logs
40
+ run it on cli.
41
 
42
  NL → nginx-log-query translation model. Fine-tune of
43
  [`google/t5-efficient-tiny`](https://huggingface.co/google/t5-efficient-tiny)