Spaces:
Sleeping
Sleeping
Create config.py
Browse files- app/core/config.py +18 -0
app/core/config.py
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from pydantic import BaseSettings
|
| 2 |
+
|
| 3 |
+
class Settings(BaseSettings):
|
| 4 |
+
TITLE: str = "Skin Cancer Detection API"
|
| 5 |
+
DESCRIPTION: str = "API for skin cancer classification and segmentation using TensorFlow models"
|
| 6 |
+
VERSION: str = "1.0.0"
|
| 7 |
+
|
| 8 |
+
# Image settings
|
| 9 |
+
IMAGE_SIZE: int = 224
|
| 10 |
+
MAX_FILE_SIZE: int = 10 * 1024 * 1024 # 10 MB
|
| 11 |
+
|
| 12 |
+
# Allowed extensions
|
| 13 |
+
ALLOWED_EXTENSIONS: set = {"jpg", "jpeg", "png"}
|
| 14 |
+
|
| 15 |
+
class Config:
|
| 16 |
+
env_file = ".env"
|
| 17 |
+
|
| 18 |
+
settings = Settings()
|