alexorlov commited on
Commit
aa24f09
·
verified ·
1 Parent(s): bdf45d0

Upload app/config.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. app/config.py +11 -10
app/config.py CHANGED
@@ -1,19 +1,20 @@
1
  from pydantic_settings import BaseSettings
2
- from functools import lru_cache
3
 
4
 
5
  class Settings(BaseSettings):
6
- anthropic_api_key: str = ""
 
 
7
  environment: str = "development"
8
  max_audio_duration_seconds: int = 120
9
- whisper_model: str = "openai/whisper-small"
10
- allowed_origins: str = "*"
 
 
 
11
 
12
- class Config:
13
- env_file = ".env"
14
- extra = "ignore"
15
 
16
 
17
- @lru_cache()
18
- def get_settings() -> Settings:
19
- return Settings()
 
1
  from pydantic_settings import BaseSettings
2
+ from typing import List
3
 
4
 
5
  class Settings(BaseSettings):
6
+ gemini_api_key: str = ""
7
+ gemini_model: str = "gemini-3-flash-preview"
8
+ whisper_model: str = "openai/whisper-small"
9
  environment: str = "development"
10
  max_audio_duration_seconds: int = 120
11
+ allowed_origins: str = "http://localhost:3000"
12
+
13
+ @property
14
+ def cors_origins(self) -> List[str]:
15
+ return [o.strip() for o in self.allowed_origins.split(",")]
16
 
17
+ model_config = {"env_file": ".env", "extra": "ignore"}
 
 
18
 
19
 
20
+ settings = Settings()