testdeep123 commited on
Commit
b6507d6
·
verified ·
1 Parent(s): bd7f63c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -8
app.py CHANGED
@@ -1,18 +1,17 @@
1
  import os
2
- import moviepy
3
- import moviepy.editor
4
  import shutil
5
  import requests
6
  import re
7
  import random
8
  import time
9
  import math
10
- from moviepy import VideoFileClip, AudioFileClip, TextClip
11
-
12
- #from moviepy.editor import (
13
- # VideoFileClip, concatenate_videoclips, AudioFileClip, ImageClip,
14
- # CompositeVideoClip, TextClip, CompositeAudioClip
15
- #)
16
  import moviepy.video.fx.all as vfx
17
  import moviepy.config as mpy_config
18
  from pydub import AudioSegment
@@ -26,6 +25,7 @@ import soundfile as sf
26
  from kokoro import KPipeline
27
  import cv2
28
  import gradio as gr
 
29
 
30
  # Initialize Kokoro TTS pipeline
31
  pipeline = KPipeline(lang_code='a') # 'a' is from original code; adjust if needed
 
1
  import os
2
+ import moviepy # Keep this if needed elsewhere (e.g., for moviepy.config)
3
+ # import moviepy.editor # No longer strictly needed if using 'from' import below
4
  import shutil
5
  import requests
6
  import re
7
  import random
8
  import time
9
  import math
10
+ # Corrected import: Uncomment this block
11
+ from moviepy.editor import (
12
+ VideoFileClip, concatenate_videoclips, AudioFileClip, ImageClip,
13
+ CompositeVideoClip, TextClip, CompositeAudioClip
14
+ )
 
15
  import moviepy.video.fx.all as vfx
16
  import moviepy.config as mpy_config
17
  from pydub import AudioSegment
 
25
  from kokoro import KPipeline
26
  import cv2
27
  import gradio as gr
28
+ import tempfile # Added for use in create_clip
29
 
30
  # Initialize Kokoro TTS pipeline
31
  pipeline = KPipeline(lang_code='a') # 'a' is from original code; adjust if needed