Update app.py
Browse files
app.py
CHANGED
@@ -7,6 +7,7 @@ import os
|
|
7 |
import asyncio
|
8 |
from image_fetcher import main
|
9 |
from video import create_text_image
|
|
|
10 |
|
11 |
app = Flask(__name__)
|
12 |
|
@@ -88,14 +89,11 @@ def generate_video():
|
|
88 |
if not image_files:
|
89 |
raise ValueError("No images found in folder!")
|
90 |
|
91 |
-
|
92 |
-
video = concatenate_videoclips(clips, method="compose")
|
93 |
-
video_path = f"/tmp/video_{uuid.uuid4().hex}.mp4"
|
94 |
-
video.write_videofile(video_path, fps=24)
|
95 |
for img in image_files:
|
96 |
os.remove(img)
|
97 |
|
98 |
-
return send_file(
|
99 |
|
100 |
except Exception as e:
|
101 |
traceback.print_exc()
|
|
|
7 |
import asyncio
|
8 |
from image_fetcher import main
|
9 |
from video import create_text_image
|
10 |
+
from video2 import video_func
|
11 |
|
12 |
app = Flask(__name__)
|
13 |
|
|
|
89 |
if not image_files:
|
90 |
raise ValueError("No images found in folder!")
|
91 |
|
92 |
+
video_location = video_func(0,lines)
|
|
|
|
|
|
|
93 |
for img in image_files:
|
94 |
os.remove(img)
|
95 |
|
96 |
+
return send_file(video_location, mimetype='video/mp4')
|
97 |
|
98 |
except Exception as e:
|
99 |
traceback.print_exc()
|