Spaces:
Runtime error
Runtime error
File size: 3,142 Bytes
76166e3 3e274d5 76166e3 3e274d5 76166e3 3e274d5 76166e3 3e274d5 76166e3 3e274d5 76166e3 d6fdb88 76166e3 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 |
from pathlib import Path
from typing import Dict
def load_config() -> Dict:
"""Load configuration settings"""
return {
"MODEL_CONFIGS": {
"conversation": {
"model_id": "mistralai/Mistral-7B-Instruct-v0.2",
"max_length": 4096,
"temperature": 0.7,
"top_p": 0.95,
"repetition_penalty": 1.1,
"context_length": 4096,
"instruction_template": """You are a therapeutic conversation agent specialized in mental health support.
Your goal is to provide empathetic, supportive responses while maintaining appropriate boundaries.
User: {input}
Assistant: """
},
"emotion_detection": {
"model_id": "mistralai/Mistral-7B-Instruct-v0.2",
"instruction_template": """Analyze the emotional content of the following text and identify the primary emotions present.
Focus on: joy, sadness, anger, fear, surprise, disgust, anxiety, and hope.
Text: {input}
Emotions: """
},
"assessment": {
"model_id": "mistralai/Mistral-7B-Instruct-v0.2",
"instruction_template": """Conduct a mental health assessment based on the user's input.
Consider: mood, anxiety levels, sleep patterns, social support, and risk factors.
Provide a structured assessment while maintaining a supportive tone.
User Input: {input}
Assessment: """
},
"crisis": {
"model_id": "mistralai/Mistral-7B-Instruct-v0.2",
"instruction_template": """You are a crisis intervention specialist. Assess the severity of the situation
and provide appropriate support and resources. Always prioritize user safety.
User: {input}
Response: """
},
"mindfulness": {
"model_id": "mistralai/Mistral-7B-Instruct-v0.2",
"instruction_template": """Guide the user through mindfulness exercises and meditation.
Provide clear, calming instructions while being attentive to their needs.
User: {input}
Guide: """
}
},
"INTERFACE_CONFIG": {
"theme": "soft",
"supported_languages": ["en"],
"max_file_size_mb": 10,
"supported_file_types": [
"text/plain",
"audio/wav",
"audio/mp3",
"image/jpeg",
"image/png",
"video/mp4"
]
},
"ANALYTICS_CONFIG": {
"metrics": [
"user_engagement",
"session_duration",
"intervention_effectiveness",
"crisis_events",
"mood_trends"
],
"reporting_interval": "daily"
}
}
|