File size: 1,465 Bytes
d97be90
 
 
 
 
 
 
 
 
 
 
 
 
990294c
d97be90
990294c
d97be90
 
ea06065
d97be90
 
 
 
 
 
 
 
 
 
 
990294c
d97be90
 
4823fe6
990294c
 
 
 
d97be90
 
 
 
 
 
 
 
 
 
 
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
"""

Configuration for Audience Segmentation System

"""

import os
from pydantic_settings import BaseSettings


class Settings(BaseSettings):
    """Application settings"""
    
    # MongoDB Configuration
    MONGODB_URI: str = os.getenv("MONGODB_URI", "mongodb://localhost:27017")
    DB_NAME: str = os.getenv("DB_NAME", "EventPlatform")
    
    # Hugging Face Token (optional)
    HF_TOKEN: str = os.getenv("HF_TOKEN", "")
    
    # Collection Names (ACTUAL MongoDB collections)
    COLLECTION_USERS: str = "User"
    COLLECTION_PAYMENTS: str = "Payment"
    COLLECTION_EVENT_VERSIONS: str = "EventVersion"
    COLLECTION_POST_SOCIAL_MEDIA: str = "PostSocialMedia"
    
    # AI Result Collections
    COLLECTION_AUDIENCE_SEGMENTS: str = "AudienceSegment"
    COLLECTION_USER_SEGMENT_ASSIGNMENTS: str = "UserSegmentAssignment"
    COLLECTION_SENTIMENT_RESULTS: str = "SentimentAnalysisResult"
    COLLECTION_EVENT_INSIGHTS: str = "EventInsightReport"
    
    # AI Models
    SENTIMENT_MODEL: str = "wonrax/phobert-base-vietnamese-sentiment"
    
    # Vistral LLM (Via HuggingFace Inference API)
    LLM_MODEL_NAME: str = os.getenv("LLM_MODEL_NAME", "Viet-Mistral/Vistral-7B-Chat")
    
    # Clustering
    N_CLUSTERS: int = 5
    RANDOM_STATE: int = 42
    
    # Batch Processing
    BATCH_SIZE: int = 32
    
    class Config:
        env_file = ".env"
        case_sensitive = True


settings = Settings()