Files changed (1) hide show
  1. Readme.md +86 -0
Readme.md ADDED
@@ -0,0 +1,86 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ title: Dr Drastic Unified Evidence Engine
3
+ emoji: "\U000026A1"
4
+ colorFrom: blue
5
+ colorTo: green
6
+ sdk: gradio
7
+ sdk_version: 6.18.0
8
+ python_version: "3.12"
9
+ app_file: app.py
10
+ fullWidth: true
11
+ pinned: false
12
+ license: mit
13
+ ---
14
+
15
+ # Dr Drastic: Unified Evidence Engine
16
+
17
+ This project fuses the strongest parts of the two original Gradio bots into one
18
+ testable application:
19
+
20
+ - PDF, DOCX, TXT, Markdown and CSV ingestion
21
+ - role classification and source IDs
22
+ - pasted or document-derived chronology extraction
23
+ - event tagging and evidence-pack completeness scoring
24
+ - potential contradiction and omission review
25
+ - source-linked evidence matrix
26
+ - legal and regulatory route suggestions
27
+ - grounded Queen Nala AI rulings with streaming responses and source-ID citations
28
+ - configurable Hugging Face inference model/provider and session knowledge base
29
+ - Markdown ruling transcript export
30
+ - text-to-speech for key panels
31
+ - TXT, JSON, DOCX and ZIP exports
32
+ - per-session Gradio state instead of a process-wide global result
33
+
34
+ ## Run
35
+
36
+ ```powershell
37
+ python -m pip install -r requirements.txt
38
+ python app.py
39
+ ```
40
+
41
+ This workspace already includes a local virtual environment:
42
+
43
+ ```powershell
44
+ .\.venv\Scripts\python.exe app.py
45
+ ```
46
+
47
+ For AI rulings, set a Hugging Face token locally or add `HF_TOKEN` as a Space
48
+ secret:
49
+
50
+ ```powershell
51
+ $env:HF_TOKEN = "hf_..."
52
+ ```
53
+
54
+ ## Hugging Face Pro
55
+
56
+ With a **Hugging Face Pro** account, Queen Nala automatically prefers
57
+ `hf-inference` then `auto` routing for better HF router access and higher
58
+ limits. Pro status is detected once per process via `whoami` when a token is
59
+ available.
60
+
61
+ | Environment | Token setup |
62
+ |-------------|-------------|
63
+ | Hugging Face Spaces | Space secret `HF_TOKEN` (Inference Providers permission) |
64
+ | GitHub Actions / Codespaces | Repository or user secret `HF_TOKEN` or `HUGGING_FACE_HUB_TOKEN` |
65
+ | Local / Docker | `$env:HF_TOKEN = "hf_..."` or `hf auth login` |
66
+
67
+ The Queen Nala tab shows a subtle routing hint when Pro is active. Pro users
68
+ get fewer provider hops and retries to avoid retry storms on transient outages.
69
+
70
+ ### Docker
71
+
72
+ ```powershell
73
+ docker build -t dr-drastic .
74
+ docker run --rm -p 7860:7860 -e HF_TOKEN=hf_... dr-drastic
75
+ ```
76
+
77
+ ## Test
78
+
79
+ The core tests do not require Gradio or document-export packages:
80
+
81
+ ```powershell
82
+ python -m unittest discover -s tests -v
83
+ ```
84
+
85
+ Automated findings are review leads, not legal conclusions or legal advice.
86
+ Verify every output against the original source documents and current law.