Spaces:
Build error
Build error
Update app.py
Browse files
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 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
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
|