-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.py
More file actions
19 lines (15 loc) · 826 Bytes
/
config.py
File metadata and controls
19 lines (15 loc) · 826 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import os
from dotenv import load_dotenv
load_dotenv()
class Config:
SECRET_KEY = os.environ.get("SECRET_KEY") or "dev-key-12345"
UPLOAD_FOLDER = os.path.join(os.path.dirname(os.path.abspath(__file__)), "temp_data")
CACHE_FOLDER = os.path.join(os.path.dirname(os.path.abspath(__file__)), "cache")
MAX_CONTENT_LENGTH = 16 * 1024 * 1024 # 16MB max file size
ALLOWED_EXTENSIONS = {"csv", "txt", "xlsx", "json"}
# Model saving configurations
MODEL_SAVE_FOLDER = os.path.join(os.path.dirname(os.path.abspath(__file__)), "saved_models")
VIZ_SAVE_FOLDER = os.path.join(os.path.dirname(os.path.abspath(__file__)), "saved_visualizations")
# Cache configurations
CACHE_THRESHOLD = 128 # Maximum number of items to store in cache
CACHE_TIMEOUT = 3600 # Cache timeout in seconds