- Updated API title from "Malaysian Language Translation API" to "Multilingual Translation API" - Updated API description to mention 105+ languages and M2M100 model - Updated /api/translate endpoint docstring to reflect multilingual support - Updated startup/shutdown log messages - Added commercial license note (Apache 2.0) in API description This ensures the Swagger UI (http://localhost:8001/docs) shows correct information. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
28 lines
690 B
Python
28 lines
690 B
Python
from pydantic_settings import BaseSettings
|
|
from typing import List
|
|
|
|
|
|
class Settings(BaseSettings):
|
|
"""Application settings"""
|
|
|
|
# API Configuration
|
|
api_host: str = "0.0.0.0"
|
|
api_port: int = 8000
|
|
api_title: str = "Multilingual Translation API"
|
|
api_version: str = "1.0.0"
|
|
api_description: str = "API for translating between 105+ languages using Facebook M2M100 model (Apache 2.0 License - Commercial use allowed)"
|
|
|
|
# Model Configuration
|
|
model_cache_dir: str = "./models"
|
|
max_length: int = 512
|
|
|
|
# CORS Settings
|
|
allowed_origins: List[str] = ["*"]
|
|
|
|
class Config:
|
|
env_file = ".env"
|
|
case_sensitive = False
|
|
|
|
|
|
settings = Settings()
|