Spaces:
Sleeping
Sleeping
Robby commited on
Commit ·
01c5b4c
1
Parent(s): 691a9b6
UI Refinement: Added horizontal margins and synchronized preview with real output
Browse files42 unmodified lines4344454647484950515253545556575859606162636465666768697071727374757642 unmodified linescentis = 0return f"{hours}:{minutes:02d}:{secs:02d}.{centis:02d}"# PRESETS Configuration (MarginV 400 is the bottom safe zone for TikTok/Reels)PRESETS = {"Viral Word-by-Word (Yellow)": {"style": "Style: Main,Impact,150,&H0000FFFF,&H000000FF,&H00000000,&H00000000,1,0,0,0,100,100,0,0,1,12,4,2,20,20,400,1","effect": "word-by-word"},"Hormozi Dynamic (Red)": {"style": "Style: Main,Impact,140,&H00FFFFFF,&H000000FF,&H000000FF,&H00000000,1,0,0,0,100,100,2,0,1,12,6,2,20,20,420,1","effect": "dynamic"},"Kinetic Power (Blue)": {"style": "Style: Main,Arial,130,&H00FFCC00,&H000000FF,&H00FFFFFF,&H00000000,1,0,0,0,100,100,0,0,1,10,5,2,20,20,450,1","effect": "kinetic"},"Pop Neon (Green)": {"style": "Style: Main,Arial,140,&H0000FF00,&H000000FF,&H0000FF00,&H0000FF00,1,0,0,0,100,100,0,0,1,6,15,2,20,20,400,1","effect": "zoom"},"Minimal Slide (White)": {"style": "Style: Main,Arial,110,&H00FFFFFF,&H000000FF,&H00000000,&H00000000,0,0,0,0,100,100,0,0,1,4,4,2,20,20,380,1","effect": "fade"},"Karaoke Fire (Orange)": {"style": "Style: Main,Arial,140,&H00FFFFFF,&H000000FF,&H000080FF,&H00000000,1,0,0,0,100,100,0,0,1,10,5,2,20,20,400,1","effect": "karaoke"},"Boxed News (Black)": {"style": "Style: Main,Arial,90,&H00FFFFFF,&H000000FF,&H00000000,&H80000000,1,0,0,0,100,100,0,0,3,0,0,2,20,20,400,1","effect": "static"}}42 unmodified lines43444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010142 unmodified linescentis = 0return f"{hours}:{minutes:02d}:{secs:02d}.{centis:02d}"# Dummy data with word-level structure to ensure preview matches real output exactlyDUMMY_TRANSCRIPT = {"segments": [{"start": 0.0, "end": 2.0, "text": "THE QUICK BROWN FOX","words": [{"word": "THE", "start": 0.0, "end": 0.4},{"word": "QUICK", "start": 0.4, "end": 0.8},{"word": "BROWN", "start": 0.8, "end": 1.2},{"word": "FOX", "start": 1.2, "end": 2.0}]},{"start": 2.0, "end": 4.0, "text": "JUMPS OVER THE LAZY DOG","words": [{"word": "JUMPS", "start": 2.0, "end": 2.5},{"word": "OVER", "start": 2.5, "end": 3.0},{"word": "THE", "start": 3.0, "end": 3.3},{"word": "LAZY", "start": 3.3, "end": 3.7},{"word": "DOG", "start": 3.7, "end": 4.0}]}]}# PRESETS Configuration (MarginL/R increased to 100 for horizontal safe zone, MarginV 400 for bottom)PRESETS = {"Viral Word-by-Word (Yellow)": {"style": "Style: Main,Impact,150,&H0000FFFF,&H000000FF,&H00000000,&H00000000,1,0,0,0,100,100,0,0,1,12,4,2,100,100,400,1","effect": "word-by-word"},"Hormozi Dynamic (Red)": {"style": "Style: Main,Impact,140,&H00FFFFFF,&H000000FF,&H000000FF,&H00000000,1,0,0,0,100,100,2,0,1,12,6,2,100,100,400,1","effect": "dynamic"},"Kinetic Power (Blue)": {"style": "Style: Main,Arial,130,&H00FFCC00,&H000000FF,&H00FFFFFF,&H00000000,1,0,0,0,100,100,0,0,1,10,5,2,100,100,400,1","effect": "kinetic"},"Pop Neon (Green)": {"style": "Style: Main,Arial,140,&H0000FF00,&H000000FF,&H0000FF00,&H0000FF00,1,0,0,0,100,100,0,0,1,6,15,2,100,100,400,1","effect": "zoom"},"Minimal Slide (White)": {"style": "Style: Main,Arial,110,&H00FFFFFF,&H000000FF,&H00000000,&H00000000,0,0,0,0,100,100,0,0,1,4,4,2,100,100,400,1","effect": "fade"},"Karaoke Fire (Orange)": {"style": "Style: Main,Arial,140,&H00FFFFFF,&H000000FF,&H000080FF,&H00000000,1,0,0,0,100,100,0,0,1,10,5,2,100,100,400,1","effect": "karaoke"},"Boxed News (Black)": {"style": "Style: Main,Arial,90,&H00FFFFFF,&H000000FF,&H00000000,&H80000000,1,0,0,0,100,100,0,0,3,0,0,2,100,100,400,1","effect": "static"}}
app.py+33-8