FastAPI app that parses CMM inspection reports (PDF/Excel/CSV), computes SPC metrics (Cp/Cpk/Pp/Ppk, control limits, Shapiro-Wilk), generates interactive Plotly charts, and provides AI-powered quality summaries via Azure OpenAI with graceful fallback. Includes 21 passing tests covering parsers, SPC calculations, and API endpoints.
15 lines
362 B
Python
15 lines
362 B
Python
from pydantic_settings import BaseSettings
|
|
|
|
|
|
class Settings(BaseSettings):
|
|
azure_openai_endpoint: str = ""
|
|
azure_openai_api_key: str = ""
|
|
azure_openai_deployment: str = "gpt-4o"
|
|
azure_openai_api_version: str = "2024-10-21"
|
|
max_upload_mb: int = 50
|
|
|
|
model_config = {"env_file": ".env", "env_file_encoding": "utf-8"}
|
|
|
|
|
|
settings = Settings()
|