Spaces:
Sleeping
Sleeping
Update main.py
Browse files
main.py
CHANGED
|
@@ -15,7 +15,7 @@ import firebase_admin
|
|
| 15 |
from PIL import ImageFont, ImageDraw, Image
|
| 16 |
import logging
|
| 17 |
import traceback
|
| 18 |
-
|
| 19 |
|
| 20 |
|
| 21 |
# Initialize Flask app and CORS
|
|
@@ -424,7 +424,7 @@ def generate_video_endpoint():
|
|
| 424 |
return jsonify({'error': 'No images available for video generation', 'log_url': upload_log()}), 500
|
| 425 |
|
| 426 |
video_output_path = f"/tmp/{uuid.uuid4().hex}.mp4"
|
| 427 |
-
video_file =
|
| 428 |
|
| 429 |
if not video_file:
|
| 430 |
logging.error("❌ ERROR: Video generation failed")
|
|
|
|
| 15 |
from PIL import ImageFont, ImageDraw, Image
|
| 16 |
import logging
|
| 17 |
import traceback
|
| 18 |
+
from video_gen import create_video
|
| 19 |
|
| 20 |
|
| 21 |
# Initialize Flask app and CORS
|
|
|
|
| 424 |
return jsonify({'error': 'No images available for video generation', 'log_url': upload_log()}), 500
|
| 425 |
|
| 426 |
video_output_path = f"/tmp/{uuid.uuid4().hex}.mp4"
|
| 427 |
+
video_file = create_video(image_files, audio_files, output_path=video_output_path)
|
| 428 |
|
| 429 |
if not video_file:
|
| 430 |
logging.error("❌ ERROR: Video generation failed")
|