|
@@ -26,6 +26,7 @@ import dataset
|
|
|
from datetime import datetime
|
|
|
from util.swap_face import swap_face
|
|
|
from fastapi.staticfiles import StaticFiles
|
|
|
+import shutil
|
|
|
#test
|
|
|
|
|
|
app = FastAPI()
|
|
@@ -135,5 +136,6 @@ def gen_video(name_hash,name,text_content, image_urls,avatar,client_id):
|
|
|
remote_svc = c.root
|
|
|
my_answer = remote_svc.call_video(name_hash,name,text_content, image_urls,avatar,client_id) # method call
|
|
|
|
|
|
- os.rename(tmp_video_dir+name_hash+'.mp4',video_dest+name_hash+'.mp4')
|
|
|
+ shutil.copy(tmp_video_dir+name_hash+'.mp4',video_dest+name_hash+'.mp4')
|
|
|
+ os.remove(tmp_video_dir+name_hash+'.mp4')
|
|
|
|