Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -3,6 +3,14 @@ import subprocess
|
|
| 3 |
import os
|
| 4 |
from datetime import datetime
|
| 5 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
def generate_video(source_image, driven_audio):
|
| 7 |
output_dir = "results"
|
| 8 |
os.makedirs(output_dir, exist_ok=True)
|
|
|
|
| 3 |
import os
|
| 4 |
from datetime import datetime
|
| 5 |
|
| 6 |
+
# 👇 Bunu buraya ekle
|
| 7 |
+
def merge_checkpoints():
|
| 8 |
+
parts = ["facevid2vid_aa", "facevid2vid_ab", "facevid2vid_ac"] # varsa devamı
|
| 9 |
+
with open("checkpoints/facevid2vid_00189-model.pth.tar", "wb") as outfile:
|
| 10 |
+
for part in parts:
|
| 11 |
+
with open(f"checkpoints/{part}", "rb") as infile:
|
| 12 |
+
outfile.write(infile.read())
|
| 13 |
+
|
| 14 |
def generate_video(source_image, driven_audio):
|
| 15 |
output_dir = "results"
|
| 16 |
os.makedirs(output_dir, exist_ok=True)
|