Spaces:
Running
on
T4
Running
on
T4
Update app.py
Browse files
app.py
CHANGED
@@ -21,7 +21,7 @@ from pytube.exceptions import VideoUnavailable
|
|
21 |
from inference.style_transfer import *
|
22 |
|
23 |
|
24 |
-
yt_video_dir = "./yt_dir/
|
25 |
os.makedirs(yt_video_dir, exist_ok=True)
|
26 |
|
27 |
|
@@ -58,6 +58,9 @@ def get_audio_from_yt_video_ref(yt_link: str, start_point_in_second=0, duration_
|
|
58 |
def inference(file_uploaded_in, file_uploaded_ref):
|
59 |
# clear out previously separated results
|
60 |
os.system(f"rm -r {yt_video_dir}/separated")
|
|
|
|
|
|
|
61 |
|
62 |
# Perform music mixing style transfer
|
63 |
args = set_up()
|
|
|
21 |
from inference.style_transfer import *
|
22 |
|
23 |
|
24 |
+
yt_video_dir = f"./yt_dir/{binascii.hexlify(os.urandom(8)).decode()}"
|
25 |
os.makedirs(yt_video_dir, exist_ok=True)
|
26 |
|
27 |
|
|
|
58 |
def inference(file_uploaded_in, file_uploaded_ref):
|
59 |
# clear out previously separated results
|
60 |
os.system(f"rm -r {yt_video_dir}/separated")
|
61 |
+
# change file path name
|
62 |
+
os.system(f"mv {file_uploaded_in} {yt_video_dir}/input.wav")
|
63 |
+
os.system(f"mv {file_uploaded_ref} {yt_video_dir}/reference.wav")
|
64 |
|
65 |
# Perform music mixing style transfer
|
66 |
args = set_up()
|