Spaces:
Sleeping
Sleeping
Upload app/config.py with huggingface_hub
Browse files- app/config.py +11 -10
app/config.py
CHANGED
|
@@ -1,19 +1,20 @@
|
|
| 1 |
from pydantic_settings import BaseSettings
|
| 2 |
-
from
|
| 3 |
|
| 4 |
|
| 5 |
class Settings(BaseSettings):
|
| 6 |
-
|
|
|
|
|
|
|
| 7 |
environment: str = "development"
|
| 8 |
max_audio_duration_seconds: int = 120
|
| 9 |
-
|
| 10 |
-
|
|
|
|
|
|
|
|
|
|
| 11 |
|
| 12 |
-
|
| 13 |
-
env_file = ".env"
|
| 14 |
-
extra = "ignore"
|
| 15 |
|
| 16 |
|
| 17 |
-
|
| 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()
|
|
|
|
|
|