Spaces:
Sleeping
Sleeping
Rajan Sharma
commited on
Update settings.py
Browse files- settings.py +53 -25
settings.py
CHANGED
|
@@ -1,34 +1,19 @@
|
|
| 1 |
# settings.py
|
| 2 |
import os
|
| 3 |
|
| 4 |
-
#
|
| 5 |
-
SNAPSHOT_PATH = os.getenv("SNAPSHOT_PATH", "
|
| 6 |
PERSIST_CONTENT = os.getenv("PERSIST_CONTENT", "false").lower() == "true"
|
| 7 |
|
| 8 |
-
# Healthcare
|
| 9 |
HEALTHCARE_SETTINGS = {
|
| 10 |
-
"phi_detection_enabled": True,
|
| 11 |
-
"min_facility_count_for_aggregation": 10,
|
| 12 |
-
"default_occupancy_threshold": 85.0,
|
| 13 |
-
"bed_change_significance_threshold": 5.0,
|
| 14 |
-
"supported_file_types": [".csv", ".xlsx", ".xls", ".json", ".parquet", ".pdf", ".docx", ".txt"],
|
| 15 |
"healthcare_keywords": [
|
| 16 |
-
"hospital", "
|
| 17 |
-
"
|
| 18 |
-
"
|
| 19 |
-
"respiratory", "virus", "flu", "surge", "acute", "long-term", "ltc"
|
| 20 |
],
|
| 21 |
-
|
| 22 |
-
"
|
| 23 |
-
"facility_name": ["facility", "name", "hospital", "site", "location"],
|
| 24 |
-
"facility_type": ["type", "category", "class", "facility_type", "odhf_facility_type"],
|
| 25 |
-
"beds_current": ["current", "2023", "2024", "beds_current", "staffed_beds", "capacity"],
|
| 26 |
-
"beds_prev": ["prev", "previous", "2022", "beds_prev", "previous_beds"],
|
| 27 |
-
"zone": ["zone", "region", "area", "district"],
|
| 28 |
-
"province": ["province", "state", "territory"],
|
| 29 |
-
"city": ["city", "municipality", "town"],
|
| 30 |
-
"teaching_status": ["teaching", "status", "type", "hospital_type"]
|
| 31 |
-
}
|
| 32 |
}
|
| 33 |
|
| 34 |
# Model settings
|
|
@@ -39,5 +24,48 @@ MODEL_SETTINGS = {
|
|
| 39 |
"repetition_penalty": 1.15
|
| 40 |
}
|
| 41 |
|
| 42 |
-
#
|
| 43 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
# settings.py
|
| 2 |
import os
|
| 3 |
|
| 4 |
+
# Snapshot settings
|
| 5 |
+
SNAPSHOT_PATH = os.getenv("SNAPSHOT_PATH", "./snapshots")
|
| 6 |
PERSIST_CONTENT = os.getenv("PERSIST_CONTENT", "false").lower() == "true"
|
| 7 |
|
| 8 |
+
# Healthcare settings
|
| 9 |
HEALTHCARE_SETTINGS = {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
"healthcare_keywords": [
|
| 11 |
+
"hospital", "clinic", "patient", "doctor", "nurse", "medical",
|
| 12 |
+
"healthcare", "diagnosis", "treatment", "pharmacy", "surgery",
|
| 13 |
+
"emergency", "icu", "ward", "bed", "capacity", "occupancy"
|
|
|
|
| 14 |
],
|
| 15 |
+
"supported_file_types": [".csv", ".json", ".txt", ".xlsx", ".xls"],
|
| 16 |
+
"max_file_size_mb": 50
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
}
|
| 18 |
|
| 19 |
# Model settings
|
|
|
|
| 24 |
"repetition_penalty": 1.15
|
| 25 |
}
|
| 26 |
|
| 27 |
+
# System prompts
|
| 28 |
+
HEALTHCARE_SYSTEM_PROMPT = """
|
| 29 |
+
You are a specialized healthcare analytics AI with expertise in:
|
| 30 |
+
- Healthcare facility operations and capacity planning
|
| 31 |
+
- Medical resource allocation and optimization
|
| 32 |
+
- Health data analysis and trend identification
|
| 33 |
+
- Healthcare policy and operational recommendations
|
| 34 |
+
|
| 35 |
+
When analyzing healthcare scenarios:
|
| 36 |
+
1. Always structure your response with clear sections:
|
| 37 |
+
- Executive Summary
|
| 38 |
+
- Data Analysis (with subsections)
|
| 39 |
+
- Key Findings
|
| 40 |
+
- Operational Recommendations
|
| 41 |
+
- Future Integration Opportunities
|
| 42 |
+
- Provenance
|
| 43 |
+
|
| 44 |
+
2. For data analysis:
|
| 45 |
+
- Include specific metrics and calculations
|
| 46 |
+
- Provide context and interpretation
|
| 47 |
+
- Identify trends and patterns
|
| 48 |
+
- Highlight significant findings
|
| 49 |
+
|
| 50 |
+
3. For recommendations:
|
| 51 |
+
- Prioritize by impact and feasibility
|
| 52 |
+
- Include implementation considerations
|
| 53 |
+
- Reference supporting data
|
| 54 |
+
|
| 55 |
+
4. Maintain strict privacy standards:
|
| 56 |
+
- Aggregate data appropriately
|
| 57 |
+
- Suppress small cohorts (<10)
|
| 58 |
+
- Never infer individual data
|
| 59 |
+
|
| 60 |
+
5. Use precise healthcare terminology and concepts.
|
| 61 |
+
"""
|
| 62 |
+
|
| 63 |
+
GENERAL_CONVERSATION_PROMPT = """
|
| 64 |
+
You are a helpful AI assistant with broad knowledge. When responding:
|
| 65 |
+
1. Be conversational and engaging
|
| 66 |
+
2. Provide accurate, well-researched information
|
| 67 |
+
3. Structure responses clearly with headings and bullet points
|
| 68 |
+
4. Cite sources when possible
|
| 69 |
+
5. Admit when you don't know something
|
| 70 |
+
6. Maintain a professional yet approachable tone
|
| 71 |
+
"""
|