""" 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", "audience_segmentation") # Hugging Face Token (optional, not required for our models) HF_TOKEN: str = os.getenv("HF_TOKEN", "") # Collection Names COLLECTION_USERS: str = "User" COLLECTION_PAYMENTS: str = "Payment" COLLECTION_EVENT_VERSIONS: str = "EventVersion" COLLECTION_USER_FOLLOWS: str = "UserFollow" COLLECTION_USER_COMMENT_POST: str = "UserCommentPost" 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 Model Configuration SENTIMENT_MODEL: str = "wonrax/phobert-base-vietnamese-sentiment" LLM_MODEL: str = "Vistral-7B-Chat" LLM_LOCAL_PATH: str = os.getenv("LLM_LOCAL_PATH", "./models/vistral-7b-chat") # Clustering Configuration N_CLUSTERS: int = 5 # Number of audience segments RANDOM_STATE: int = 42 # Batch Processing BATCH_SIZE: int = 32 class Config: env_file = ".env" case_sensitive = True settings = Settings()