Spaces:
Sleeping
Sleeping
rogerxavier
commited on
Commit
•
aee382f
1
Parent(s):
a98d807
Update moviepyTest.py
Browse files- moviepyTest.py +4 -0
moviepyTest.py
CHANGED
@@ -1,8 +1,12 @@
|
|
1 |
from moviepy.editor import *
|
2 |
import cv2
|
3 |
import numpy as np
|
|
|
|
|
4 |
|
5 |
def test():
|
|
|
|
|
6 |
# 图片素材和字幕
|
7 |
image_files = ['6.jpg', '7.jpg']
|
8 |
subtitles = ['Subtitle 1', 'Subtitle 2']
|
|
|
1 |
from moviepy.editor import *
|
2 |
import cv2
|
3 |
import numpy as np
|
4 |
+
import subprocess
|
5 |
+
|
6 |
|
7 |
def test():
|
8 |
+
# 执行命令
|
9 |
+
subprocess.run(["apt", "install", "imagemagick"])
|
10 |
# 图片素材和字幕
|
11 |
image_files = ['6.jpg', '7.jpg']
|
12 |
subtitles = ['Subtitle 1', 'Subtitle 2']
|