Ahsen Khaliq
commited on
Commit
•
0a5fc1b
1
Parent(s):
9a141af
Update app.py
Browse files
app.py
CHANGED
@@ -5,9 +5,11 @@ from pathlib import Path
|
|
5 |
|
6 |
def inference(audio):
|
7 |
os.makedirs("out", exist_ok=True)
|
8 |
-
os.
|
9 |
-
|
10 |
-
|
|
|
|
|
11 |
|
12 |
title = "Anime2Sketch"
|
13 |
description = "demo for Anime2Sketch. To use it, simply upload your image, or click one of the examples to load them. Read more at the links below."
|
|
|
5 |
|
6 |
def inference(audio):
|
7 |
os.makedirs("out", exist_ok=True)
|
8 |
+
oldext = os.path.splitext(audio)[1]
|
9 |
+
os.rename(audio.name, "audio" + oldext)
|
10 |
+
os.system("python3 -m demucs.separate -n demucs48_hq -d cpu " +"audio"+oldtext+" -o out")
|
11 |
+
#audioname = Path(audio.name).stem
|
12 |
+
return "./out/demucs48_hq/audio/vocals.wav"
|
13 |
|
14 |
title = "Anime2Sketch"
|
15 |
description = "demo for Anime2Sketch. To use it, simply upload your image, or click one of the examples to load them. Read more at the links below."
|