Abu1998 commited on
Commit
e989a60
·
verified ·
1 Parent(s): a58c46d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -2
app.py CHANGED
@@ -475,6 +475,13 @@ class VisualFetcher:
475
  return video_paths
476
 
477
  # ==================== STEP 6: VIDEO ASSEMBLY ====================
 
 
 
 
 
 
 
478
 
479
  class VideoAssembler:
480
  """Assemble final video from clips + audio + timestamps"""
@@ -482,7 +489,7 @@ class VideoAssembler:
482
  def __init__(self):
483
  self.use_moviepy = MOVIEPY_AVAILABLE
484
 
485
- def resize_clip_moviepy(self, clip: VideoFileClip, aspect_ratio: str) -> VideoFileClip:
486
  """Resize clip to target aspect ratio using MoviePy"""
487
  target_ratios = {
488
  '16:9': (1920, 1080),
@@ -705,7 +712,6 @@ class VideoAssembler:
705
  return self.assemble_with_ffmpeg(
706
  video_paths, timestamps, audio_path, output_path, aspect_ratio
707
  )
708
-
709
  # ==================== MAIN PIPELINE ====================
710
 
711
  class VideoPipeline:
 
475
  return video_paths
476
 
477
  # ==================== STEP 6: VIDEO ASSEMBLY ====================
478
+ # At the top of your file, add this import
479
+ from typing import TYPE_CHECKING
480
+
481
+ if TYPE_CHECKING:
482
+ from moviepy.editor import VideoFileClip
483
+
484
+ # Then modify the VideoAssembler class:
485
 
486
  class VideoAssembler:
487
  """Assemble final video from clips + audio + timestamps"""
 
489
  def __init__(self):
490
  self.use_moviepy = MOVIEPY_AVAILABLE
491
 
492
+ def resize_clip_moviepy(self, clip: "VideoFileClip", aspect_ratio: str) -> "VideoFileClip":
493
  """Resize clip to target aspect ratio using MoviePy"""
494
  target_ratios = {
495
  '16:9': (1920, 1080),
 
712
  return self.assemble_with_ffmpeg(
713
  video_paths, timestamps, audio_path, output_path, aspect_ratio
714
  )
 
715
  # ==================== MAIN PIPELINE ====================
716
 
717
  class VideoPipeline: