rishanthrajendhran commited on
Commit
b5d8bf3
·
verified ·
1 Parent(s): 81f842b

Card: quick start with the idealens package (classify, extract, score)

Browse files
Files changed (1) hide show
  1. README.md +16 -3
README.md CHANGED
@@ -33,16 +33,29 @@ identically on outlines, reaches 95.3% and 81.3%; Pangram 4 reaches 98.5% and 25
33
 
34
  Pass the document text as is.
35
 
36
- ### With the idealens package
37
 
38
- [idealens](https://github.com/RishanthRajendhran/IdeaLens) ([PyPI](https://pypi.org/project/idealens/)) scores with this model on vLLM and applies the thresholds in this repo:
 
39
 
40
  ```bash
41
  pip install "idealens[vllm]"
42
  idealens score docs.jsonl -o scores.jsonl --model ProseLens
43
  ```
44
 
45
- Input is JSONL with a `text` field per document. The rest of this section runs the model directly.
 
 
 
 
 
 
 
 
 
 
 
 
46
 
47
  ### Load the merged model (66 GB download)
48
 
 
33
 
34
  Pass the document text as is.
35
 
36
+ ### Quick start with the idealens package
37
 
38
+ [idealens](https://github.com/RishanthRajendhran/IdeaLens) ([PyPI](https://pypi.org/project/idealens/)) scores documents with ProseLens on vLLM and applies the thresholds in this repo. No
39
+ outline and no LLM call is needed:
40
 
41
  ```bash
42
  pip install "idealens[vllm]"
43
  idealens score docs.jsonl -o scores.jsonl --model ProseLens
44
  ```
45
 
46
+ Input is JSONL with a `text` field per document. In Python:
47
+
48
+ ```python
49
+ import idealens as il
50
+
51
+ with il.Detector("ProseLens") as det: # vLLM, with this repo's thresholds
52
+ records = det.score_documents([open("document.txt").read()])
53
+ print(records[0]["p_human"], records[0]["verdict"]["ai"])
54
+ ```
55
+
56
+ To compare with idea-level detection on the same documents, `idealens run docs.jsonl -o ideas.jsonl --model IdeaLens`
57
+ extracts their outlines and scores them with [IdeaLens](https://huggingface.co/rishanthrajendhran/IdeaLens). The rest
58
+ of this section runs the model directly.
59
 
60
  ### Load the merged model (66 GB download)
61