Spaces:
Running
Running
Upload myinfer_latest.py
Browse files- myinfer_latest.py +7 -1
myinfer_latest.py
CHANGED
@@ -35,6 +35,7 @@ import boto3
|
|
35 |
import os
|
36 |
import ffmpeg
|
37 |
import os
|
|
|
38 |
|
39 |
|
40 |
|
@@ -390,7 +391,12 @@ def api_convert_voice():
|
|
390 |
|
391 |
#upload_to_do(output_path1)
|
392 |
|
393 |
-
|
|
|
|
|
|
|
|
|
|
|
394 |
os.makedirs("output/result", exist_ok=True)
|
395 |
output_dir="output/result"
|
396 |
mp4_path = merge_audio_image(output_path1, image_path, output_dir, unique_id)
|
|
|
35 |
import os
|
36 |
import ffmpeg
|
37 |
import os
|
38 |
+
import random
|
39 |
|
40 |
|
41 |
|
|
|
391 |
|
392 |
#upload_to_do(output_path1)
|
393 |
|
394 |
+
image_files = ['1.jpg', '2.jpg', '3.jpg', '4.jpg', '5.jpg', '6.jpg']
|
395 |
+
|
396 |
+
# Choose a random image file
|
397 |
+
image_path = random.choice(image_files)
|
398 |
+
|
399 |
+
#image_path = 'singer.jpg'
|
400 |
os.makedirs("output/result", exist_ok=True)
|
401 |
output_dir="output/result"
|
402 |
mp4_path = merge_audio_image(output_path1, image_path, output_dir, unique_id)
|