Dyen commited on
Commit
ee87f38
·
1 Parent(s): c0f8e0d

Fix: Cloud-friendly config (max 20 shorts, no face tracking)

Browse files
Files changed (1) hide show
  1. backend/config.py +13 -13
backend/config.py CHANGED
@@ -13,17 +13,17 @@ class Settings(BaseSettings):
13
  """Application settings loaded from environment variables."""
14
 
15
  # Video Processing Limits
16
- max_input_duration: int = 7200 # 2 hours in seconds
17
  min_short_duration: int = 15
18
- max_short_duration: int = 120
19
- max_shorts: int = 150 # Maximum shorts to generate
20
- min_shorts: int = 10 # Minimum shorts to aim for
21
 
22
  # Scene Detection (PySceneDetect)
23
  scene_detection_threshold: float = 27.0
24
 
25
- # Highlight Detection (lowered to get more shorts)
26
- score_threshold: float = 4.5
27
 
28
  # Whisper.cpp Configuration (use env vars in Docker)
29
  whisper_bin_path: str = "/usr/local/bin/whisper"
@@ -58,15 +58,15 @@ class Settings(BaseSettings):
58
  output_width: int = 1080
59
  output_height: int = 1920
60
 
61
- # V2: Caption Settings
62
- caption_style: str = "trendy" # "trendy" for animated, "simple" for basic SRT
63
- highlight_keywords: bool = True
64
 
65
- # V2: Face Tracking
66
- face_tracking_enabled: bool = True
67
 
68
- # V2: Faster-Whisper (for word-level timestamps)
69
- faster_whisper_model: str = "base" # tiny, base, small, medium, large
70
 
71
  class Config:
72
  env_file = ".env"
 
13
  """Application settings loaded from environment variables."""
14
 
15
  # Video Processing Limits
16
+ max_input_duration: int = 3600 # 1 hour max for cloud (was 2 hours)
17
  min_short_duration: int = 15
18
+ max_short_duration: int = 90 # Shorter max for faster cloud processing
19
+ max_shorts: int = 20 # Cloud friendly limit (was 150!)
20
+ min_shorts: int = 5 # Minimum shorts to aim for
21
 
22
  # Scene Detection (PySceneDetect)
23
  scene_detection_threshold: float = 27.0
24
 
25
+ # Highlight Detection (higher = more selective)
26
+ score_threshold: float = 6.0 # Only best clips (was 4.5)
27
 
28
  # Whisper.cpp Configuration (use env vars in Docker)
29
  whisper_bin_path: str = "/usr/local/bin/whisper"
 
58
  output_width: int = 1080
59
  output_height: int = 1920
60
 
61
+ # V2: Caption Settings (use simple for cloud stability)
62
+ caption_style: str = "simple" # "simple" for cloud (trendy needs more RAM)
63
+ highlight_keywords: bool = False
64
 
65
+ # V2: Face Tracking (DISABLED for cloud - very CPU heavy)
66
+ face_tracking_enabled: bool = False
67
 
68
+ # V2: Faster-Whisper (tiny for cloud speed)
69
+ faster_whisper_model: str = "tiny" # tiny for speed (was base)
70
 
71
  class Config:
72
  env_file = ".env"