semantix-api / config.py
Miroir's picture
updated config file
71b2d9b
raw
history blame contribute delete
695 Bytes
from typing import Dict, Any, List
from pydantic_settings import BaseSettings
class Settings(BaseSettings):
model_config = {
'protected_namespaces': (),
'env_prefix': "SEMANTIX_"
}
# ML API settings
app_name: str = "Semantix ML API"
version: str = "1.0.0"
debug: bool = False
model_url: str = "https://huggingface.co/Miroir/cc.fr.300.reduced/resolve/main/cc.fr.300.reduced.vec"
# ML model constants
similarity_threshold: float = 0.99
default_similar_words_count: int = 20
cache_size: int = 1000
# Create settings instance
settings = Settings()
# ML-related constants
DEFAULT_SIMILARITY_THRESHOLD = 0.99