MukulRay commited on
Commit
fa89d46
Β·
1 Parent(s): 07c7e4c

Split requirements: slim runtime for HF Space, dev file for full training stack

Browse files
Files changed (2) hide show
  1. requirements-dev.txt +46 -0
  2. requirements.txt +21 -44
requirements-dev.txt ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # EmpathRAG β€” Full development / training dependencies
2
+ #
3
+ # Install order matters β€” read INSTALL NOTES below before running pip install.
4
+ # The slim runtime requirements live in requirements.txt and are what the
5
+ # Hugging Face Space and Gradio demo actually import. This file adds the
6
+ # baseline-iteration training stack (RoBERTa, DeBERTa, Mistral, FAISS) used
7
+ # by the notebooks and the V1 pipeline.
8
+ #
9
+ # ── INSTALL NOTES ──────────────────────────────────────────────────────────────
10
+ # 1. PyTorch (CUDA) - install FIRST before anything else:
11
+ # pip install torch==2.5.1+cu121 --index-url https://download.pytorch.org/whl/cu121
12
+ #
13
+ # 2. llama-cpp-python (CUDA wheel) - install SECOND:
14
+ # pip install llama_cpp_python==0.3.4 --extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cu121
15
+ #
16
+ # 3. Everything else:
17
+ # pip install -r requirements-dev.txt
18
+ #
19
+ # 4. Force correct numpy (faiss requires <2.0):
20
+ # pip install "numpy==1.26.4" --force-reinstall
21
+ # ──────────────────────────────────────────────────────────────────────────────
22
+
23
+ # Slim runtime (also pulled by requirements.txt)
24
+ -r requirements.txt
25
+
26
+ # HuggingFace stack β€” baseline iteration only
27
+ transformers==4.57.6
28
+ peft==0.18.1
29
+ datasets==2.18.0
30
+ accelerate==1.13.0
31
+ evaluate==0.4.1
32
+
33
+ # Retrieval β€” baseline iteration only
34
+ faiss-cpu==1.9.0.post1
35
+ sentence-transformers==3.4.1
36
+
37
+ # Explainability β€” baseline iteration only
38
+ captum==0.7.0
39
+
40
+ # Evaluation
41
+ ragas==0.1.21
42
+ bert-score==0.3.13
43
+ rank-bm25==0.2.2
44
+
45
+ # Data utilities only used by training notebooks
46
+ kaggle==1.6.3
requirements.txt CHANGED
@@ -1,52 +1,29 @@
1
- # EmpathRAG - Python Dependencies
2
- # Install order matters - read INSTALL NOTES below before running pip install
3
-
4
- # ── INSTALL NOTES ──────────────────────────────────────────────────────────────
5
- # 1. PyTorch (CUDA) - install FIRST before anything else:
6
- # pip install torch==2.5.1+cu121 --index-url https://download.pytorch.org/whl/cu121
7
- #
8
- # 2. llama-cpp-python (CUDA wheel) - install SECOND:
9
- # pip install llama_cpp_python==0.3.4 --extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cu121
10
  #
11
- # 3. Everything else:
12
- # pip install -r requirements.txt
13
- #
14
- # 4. Force correct numpy (faiss requires <2.0):
15
- # pip install "numpy==1.26.4" --force-reinstall
16
- # ──────────────────────────────────────────────────────────────────────────────
17
-
18
- # HuggingFace stack
19
- transformers==4.57.6
20
- peft==0.18.1
21
- datasets==2.18.0
22
- accelerate==1.13.0
23
- evaluate==0.4.1
24
 
25
- # Retrieval
26
- faiss-cpu==1.9.0
27
- sentence-transformers==3.4.1
28
-
29
- # Explainability
30
- captum==0.7.0
31
 
32
- # Evaluation
33
- ragas==0.1.21
34
- bert-score==0.3.13
35
- rank-bm25==0.2.2
36
- scipy==1.17.1
37
  scikit-learn==1.8.0
 
 
38
 
39
- # Demo
40
- gradio==4.44.1
41
- fastapi==0.115.5
42
- starlette==0.41.3
43
- pydantic==2.10.6
44
-
45
- # Data / Utilities
46
  pandas==2.3.3
47
- numpy==1.26.4
48
- tqdm==4.67.3
49
- kaggle==1.6.3
50
 
51
- # Support Plan export (counselor-friendly PDF)
52
  fpdf2==2.8.4
 
 
 
 
 
 
 
 
 
 
 
1
+ # EmpathRAG β€” Slim runtime dependencies
 
 
 
 
 
 
 
 
2
  #
3
+ # These are the packages the live Gradio demo and the Hugging Face Space
4
+ # actually import at runtime. For the full training/baseline stack
5
+ # (RoBERTa, DeBERTa, Mistral, FAISS, etc.), use requirements-dev.txt.
 
 
 
 
 
 
 
 
 
 
6
 
7
+ # Demo UI
8
+ gradio==4.44.1
 
 
 
 
9
 
10
+ # Hybrid route classifier (TF-IDF + logistic regression)
 
 
 
 
11
  scikit-learn==1.8.0
12
+ scipy==1.17.1
13
+ numpy>=2.1,<3.0
14
 
15
+ # Tabular utilities
 
 
 
 
 
 
16
  pandas==2.3.3
 
 
 
17
 
18
+ # Support-plan PDF export (uses bundled DejaVu font for Unicode)
19
  fpdf2==2.8.4
20
+ matplotlib>=3.9,<4.0
21
+
22
+ # Local development convenience (.env loading)
23
+ python-dotenv>=1.0
24
+
25
+ # HTTP client (Groq + Anthropic API calls)
26
+ requests>=2.31
27
+
28
+ # Progress bars (used by some scripts)
29
+ tqdm>=4.67