Spaces:
Sleeping
Sleeping
| import os | |
| class Config: | |
| """Configuration class for VR180 Converter""" | |
| # Flask configuration | |
| SECRET_KEY = os.environ.get('SECRET_KEY') or 'dev-secret-key-change-in-production' | |
| # File upload configuration | |
| MAX_CONTENT_LENGTH = 500 * 1024 * 1024 # 500MB | |
| UPLOAD_FOLDER = 'uploads' | |
| OUTPUT_FOLDER = 'outputs' | |
| ALLOWED_EXTENSIONS = {'mp4', 'avi', 'mov', 'mkv', 'webm'} | |
| # Video processing configuration | |
| DEFAULT_FPS = 30 | |
| MAX_VIDEO_DURATION = 300 # 5 minutes | |
| PROCESSING_TIMEOUT = 1800 # 30 minutes | |
| # AI model configuration | |
| DEPTH_MODEL = os.environ.get('DEPTH_MODEL') or 'Intel/dpt-hybrid-midas' | |
| USE_GPU = os.environ.get('USE_GPU', 'false').lower() == 'true' | |
| # CORS configuration | |
| CORS_ORIGINS = ['http://localhost:3000', 'http://127.0.0.1:3000'] | |
| def init_app(app): | |
| """Initialize app with configuration""" | |
| app.config.from_object(Config) | |