Prithwis commited on
Commit
6f7e554
·
verified ·
1 Parent(s): 2512968

Upload backend\config.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. backend//config.py +30 -0
backend//config.py ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+
3
+ class Config:
4
+ """Configuration class for VR180 Converter"""
5
+
6
+ # Flask configuration
7
+ SECRET_KEY = os.environ.get('SECRET_KEY') or 'dev-secret-key-change-in-production'
8
+
9
+ # File upload configuration
10
+ MAX_CONTENT_LENGTH = 500 * 1024 * 1024 # 500MB
11
+ UPLOAD_FOLDER = 'uploads'
12
+ OUTPUT_FOLDER = 'outputs'
13
+ ALLOWED_EXTENSIONS = {'mp4', 'avi', 'mov', 'mkv', 'webm'}
14
+
15
+ # Video processing configuration
16
+ DEFAULT_FPS = 30
17
+ MAX_VIDEO_DURATION = 300 # 5 minutes
18
+ PROCESSING_TIMEOUT = 1800 # 30 minutes
19
+
20
+ # AI model configuration
21
+ DEPTH_MODEL = os.environ.get('DEPTH_MODEL') or 'Intel/dpt-hybrid-midas'
22
+ USE_GPU = os.environ.get('USE_GPU', 'false').lower() == 'true'
23
+
24
+ # CORS configuration
25
+ CORS_ORIGINS = ['http://localhost:3000', 'http://127.0.0.1:3000']
26
+
27
+ @staticmethod
28
+ def init_app(app):
29
+ """Initialize app with configuration"""
30
+ app.config.from_object(Config)