-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathtest_video_generation.py
More file actions
40 lines (32 loc) · 1.32 KB
/
Copy pathtest_video_generation.py
File metadata and controls
40 lines (32 loc) · 1.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import asyncio
from pathlib import Path
from video_utils import VideoGenerator
import logging
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)
async def test_video_generation():
"""Test video generation with content"""
try:
# Initialize VideoGenerator
logger.info("Initializing VideoGenerator...")
generator = VideoGenerator()
# Test content
test_content = """
Breaking News: Artificial Intelligence Breakthrough
Scientists have achieved a major milestone in AI development.
This discovery promises to revolutionize how we interact with technology.
The implications for healthcare and education are enormous.
Experts predict this will transform our daily lives.
"""
# Test 1: Default settings
logger.info("Test 1: Default video generation...")
default_video_path = await generator.generate_video(test_content)
if default_video_path:
logger.info(f"✅ Default video generated at: {default_video_path}")
else:
logger.error("❌ Default video generation failed")
except Exception as e:
logger.error(f"Test failed with error: {e}")
if __name__ == "__main__":
# Run the test
asyncio.run(test_video_generation())