| """
|
| Configuration for Audience Segmentation System
|
| """
|
|
|
| import os
|
| from pydantic_settings import BaseSettings
|
|
|
|
|
| class Settings(BaseSettings):
|
| """Application settings"""
|
|
|
|
|
| MONGODB_URI: str = os.getenv("MONGODB_URI", "mongodb://localhost:27017")
|
| DB_NAME: str = os.getenv("DB_NAME", "EventPlatform")
|
|
|
|
|
| HF_TOKEN: str = os.getenv("HF_TOKEN", "")
|
|
|
|
|
| COLLECTION_USERS: str = "User"
|
| COLLECTION_PAYMENTS: str = "Payment"
|
| COLLECTION_EVENT_VERSIONS: str = "EventVersion"
|
| COLLECTION_POST_SOCIAL_MEDIA: str = "PostSocialMedia"
|
|
|
|
|
| COLLECTION_AUDIENCE_SEGMENTS: str = "AudienceSegment"
|
| COLLECTION_USER_SEGMENT_ASSIGNMENTS: str = "UserSegmentAssignment"
|
| COLLECTION_SENTIMENT_RESULTS: str = "SentimentAnalysisResult"
|
| COLLECTION_EVENT_INSIGHTS: str = "EventInsightReport"
|
|
|
|
|
| SENTIMENT_MODEL: str = "wonrax/phobert-base-vietnamese-sentiment"
|
|
|
|
|
| LLM_MODEL_NAME: str = os.getenv("LLM_MODEL_NAME", "Viet-Mistral/Vistral-7B-Chat")
|
|
|
|
|
| N_CLUSTERS: int = 5
|
| RANDOM_STATE: int = 42
|
|
|
|
|
| BATCH_SIZE: int = 32
|
|
|
| class Config:
|
| env_file = ".env"
|
| case_sensitive = True
|
|
|
|
|
| settings = Settings()
|
|
|