Rajan Sharma commited on
Commit
fa2487d
·
verified ·
1 Parent(s): 44836be

Update settings.py

Browse files
Files changed (1) hide show
  1. settings.py +23 -20
settings.py CHANGED
@@ -1,24 +1,27 @@
1
- from pathlib import Path
 
2
 
3
- # Privacy / PHI
4
- PHI_SAFE_MODE: bool = True # redact before indexing/logging
5
- PERSIST_CONTENT: bool = False # never store message/upload contents to disk
6
 
7
- # Uploads
8
- MAX_UPLOAD_MB: int = 15
9
- ALLOWED_EXT = {".pdf", ".docx", ".txt", ".md", ".csv", ".png", ".jpg", ".jpeg", ".webp"}
10
- ALLOWED_MIME = {
11
- "application/pdf",
12
- "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
13
- "text/plain", "text/markdown", "text/csv",
14
- "image/png", "image/jpeg", "image/webp",
 
 
 
15
  }
16
 
17
- # Optional AV (clamd). If True and clamd is reachable, files will be scanned before parsing.
18
- ENABLE_AV_SCAN: bool = True
19
- CLAMD_UNIX_SOCKET: str | None = None # e.g., "/var/run/clamav/clamd.ctl"
20
- CLAMD_NETWORK: tuple[str, int] | None = None # e.g., ("localhost", 3310)
21
-
22
- # Paths
23
- SNAPSHOT_PATH = "snapshots/current.json"
24
- RAG_STORE_DIR = Path("rag_store")
 
1
+ # settings.py
2
+ import os
3
 
4
+ # Basic settings
5
+ SNAPSHOT_PATH = os.getenv("SNAPSHOT_PATH", "snapshot.json")
6
+ PERSIST_CONTENT = os.getenv("PERSIST_CONTENT", "false").lower() == "true"
7
 
8
+ # Healthcare-specific settings
9
+ HEALTHCARE_SETTINGS = {
10
+ "phi_detection_enabled": True,
11
+ "min_facility_count_for_aggregation": 10,
12
+ "default_occupancy_threshold": 85.0, # Percentage
13
+ "bed_change_significance_threshold": 5.0, # Percentage
14
+ "supported_file_types": [".csv", ".xlsx", ".pdf", ".docx", ".txt"],
15
+ "healthcare_keywords": [
16
+ "hospital", "patient", "bed", "care", "health", "medical", "clinical",
17
+ "facility", "nursing", "residential", "ambulatory", "healthcare", "occupancy"
18
+ ]
19
  }
20
 
21
+ # Model settings
22
+ MODEL_SETTINGS = {
23
+ "max_new_tokens": 2048,
24
+ "temperature": 0.3,
25
+ "top_p": 0.9,
26
+ "repetition_penalty": 1.15
27
+ }